transport = 'udp'; $worker->onMessage = function($connection, $data){ $data=json_decode($data); $type=$data->type; $name=$data->name; $rip=$connection->getRemoteIp(); echo "$type\n$name\n$rip\n"; $send['type']='A'; $send['detail']='119.29.29.29'; $send['id']=$data->id; $send['query']=$data->query; $send=json_encode($send); $connection->send($send); }; Worker::runAll();