27 lines
519 B
PHP
27 lines
519 B
PHP
|
<?php
|
||
|
namespace process;
|
||
|
|
||
|
use Workerman\Connection\TcpConnection;
|
||
|
|
||
|
class DnsProcess
|
||
|
{
|
||
|
public function onConnect(TcpConnection $connection)
|
||
|
{
|
||
|
echo "onConnect\n";
|
||
|
}
|
||
|
|
||
|
public function onWebSocketConnect(TcpConnection $connection, $http_buffer)
|
||
|
{
|
||
|
echo "onWebSocketConnect\n";
|
||
|
}
|
||
|
|
||
|
public function onMessage(TcpConnection $connection, $data)
|
||
|
{
|
||
|
$connection->send($data);
|
||
|
}
|
||
|
|
||
|
public function onClose(TcpConnection $connection)
|
||
|
{
|
||
|
echo "onClose\n";
|
||
|
}
|
||
|
}
|