12 lines
330 B
PHP
12 lines
330 B
PHP
<?php
|
|
use Workerman\Worker;
|
|
use Workerman\Connection\TcpConnection;
|
|
use Workerman\Protocols\Http\Request;
|
|
require_once __DIR__ . '/vendor/autoload.php';
|
|
|
|
$udp_worker = new Worker('udp://127.0.0.1:9090');
|
|
$udp_worker->onMessage = function($connection, $data){
|
|
var_dump($data);
|
|
$connection->send('get');
|
|
};
|
|
Worker::runAll(); |