public function sendPacket($type, $packet)
    {
        $header = $type . pack('N', mb_orig_strlen($packet) + 4);

        $this->write($header);
        $this->write($packet);

        if ($this->pool->config->protologging->value) {
            Daemon::log('Client --> Server: ' . Debug::exportBytes($header . $packet) . "\n\n");
        }

        return true;
    }
public function sendPacket($type, $packet)
    {
        $header = $type . pack('N', mb_orig_strlen($packet) + 4);

        $this->write($header);
        $this->write($packet);

        if ($this->pool->config->protologging->value) {
            Daemon::log('Client --> Server: ' . Debug::exportBytes($header . $packet) . "\n\n");
        }

        return true;
    }
public function sendPacket ( $ type , $ packet ) { $ header = $ type . pack ( 'N' , mb_orig_strlen ( $ packet ) + 4 ) ; $ this -> write ( $ header ) ; $ this -> write ( $ packet ) ; if ( $ this -> pool -> config -> protologging -> value ) { Daemon :: log ( 'Client --> Server: ' . Debug :: exportBytes ( $ header . $ packet ) . "\n\n" ) ; } return true ; }
Send a packet
@param  string $type Data
@param  string $packet Packet
@return boolean         Success
Send a packet