|
...
|
...
|
@@ -19,9 +19,11 @@ Websocket::on('connect', function ($websocket, Request $request) { |
|
|
|
});
|
|
|
|
|
|
|
|
Websocket::on('disconnect', function ($websocket) {
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export(22222, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
// called while socket on disconnect
|
|
|
|
});
|
|
|
|
|
|
|
|
Websocket::on('example', function ($websocket, $data) {
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export(3333, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$websocket->emit('message', $data);
|
|
|
|
}); |
...
|
...
|
|