ShTcp.php 324 B

1234567891011121314151617
  1. <?php
  2. namespace app\workerman;
  3. use think\facade\Log;
  4. use think\worker\Server;
  5. class ShTcp extends Server
  6. {
  7. protected $socket = 'tcp://0.0.0.0:21444';
  8. public function onMessage($connection, $data)
  9. {
  10. //$connection->send(json_encode($data));
  11. Log::info("ShTcp");
  12. Log::info($data);
  13. }
  14. }