public function process()
    {
        $data = $this->socket->receive();
        $bytes = strlen($data);

        if ($bytes === 0 || $data === false) {
            throw new CloseException('Error reading data from socket: ' . $this->socket->getLastError());
        }

        $this->onData($data);
    }
public function process()
    {
        $data = $this->socket->receive();
        $bytes = strlen($data);

        if ($bytes === 0 || $data === false) {
            throw new CloseException('Error reading data from socket: ' . $this->socket->getLastError());
        }

        $this->onData($data);
    }
public function process ( ) { $ data = $ this -> socket -> receive ( ) ; $ bytes = strlen ( $ data ) ; if ( $ bytes === 0 || $ data === false ) { throw new CloseException ( 'Error reading data from socket: ' . $ this -> socket -> getLastError ( ) ) ; } $ this -> onData ( $ data ) ; }
Processes data on the socket

@throws CloseException
Processes data on the socket