public function write($data)
    {

        try {
            // No socket for this server, make one
            if (is_null($this->socket)) {
                $this->create();
            }

            // Send the packet
            return fwrite($this->socket, $data);
        } catch (\Exception $e) {
            throw new Exception($e->getMessage(), $e->getCode(), $e);
        }
    }
public function write($data)
    {

        try {
            // No socket for this server, make one
            if (is_null($this->socket)) {
                $this->create();
            }

            // Send the packet
            return fwrite($this->socket, $data);
        } catch (\Exception $e) {
            throw new Exception($e->getMessage(), $e->getCode(), $e);
        }
    }
public function write ( $ data ) { try { // No socket for this server, make one if ( is_null ( $ this -> socket ) ) { $ this -> create ( ) ; } // Send the packet return fwrite ( $ this -> socket , $ data ) ; } catch ( \ Exception $ e ) { throw new Exception ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ; } }
Write data to the socket

@param string $data

@return int The number of bytes written
@throws \GameQ\Exception\Query
Write data to the socket