27 lines
512 B
PHP
27 lines
512 B
PHP
<?php
|
|
namespace process;
|
|
|
|
use Workerman\Connection\TcpConnection;
|
|
|
|
class Dns
|
|
{
|
|
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";
|
|
}
|
|
} |