Workerman-DNS/.history/start_20220909180833.php

12 lines
322 B
PHP
Raw Permalink Normal View History

2022-12-15 18:09:24 +08:00
<?php
use Workerman\Worker;
use Workerman\Connection\TcpConnection;
use Workerman\Protocols\Http\Request;
require_once __DIR__ . '/vendor/autoload.php';
$udp_worker = new Worker('udp://0.0.0.0:53');
$udp_worker->onMessage = function($connection, $data){
echo($data);
$connection->send('get');
};
Worker::runAll();