```php
<?php
namespace app\controller;
use support\Request;
use Workerman\Connection\AsyncTcpConnection;
class Cabinet
{
//
public function __construct()
{
global $con;
global $cmdindex;
$con = new AsyncTcpConnection('tcp://127.0.0.1:8282');
$con->onConnect = function(AsyncTcpConnection $con) {
//$con->send('hello');
};
$con->onMessage = function(AsyncTcpConnection $con, $data) {
//双倍接收
echo $data;
//$con->send($data);
};
$con->connect();
}
//
public function hello(Request $request)
{
global $con;
$default_name = 'webman';
```