<?php
use GatewayWorker\Protocols\GatewayProtocol;

class Gateway extends GatewayWorker\Gateway
{
    public function onClientMessage($connection, $data)
    {
        $connection->pingNotResponseCount = -1;
        if ($data === '1') {
            $connection->send('2');
            return;
        }
        $this->sendToWorker(GatewayProtocol::CMD_ON_MESSAGE, $connection, $data);
    }
}

