src/Lib/Client.php
protected function writeToRemote($data, $connection)
    {
        $buffer = serialize($data);
        $buffer = pack('N', 4 + strlen($buffer)) . $buffer;
        $len = fwrite($connection, $buffer);
        if ($len !== strlen($buffer)) {
            throw new \Exception('writeToRemote fail');
        }
    }
protected function writeToRemote($data, $connection)
    {
        $buffer = serialize($data);
        $buffer = pack('N', 4 + strlen($buffer)) . $buffer;
        $len = fwrite($connection, $buffer);
        if ($len !== strlen($buffer)) {
            throw new \Exception('writeToRemote fail');
        }
    }
protected function writeToRemote ( $ data , $ connection ) { $ buffer = serialize ( $ data ) ; $ buffer = pack ( 'N' , 4 + strlen ( $ buffer ) ) . $ buffer ; $ len = fwrite ( $ connection , $ buffer ) ; if ( $ len !== strlen ( $ buffer ) ) { throw new \ Exception ( 'writeToRemote fail' ) ; } }
Write data to global server.
@param string $buffer
Write data to global server .