Net_GameServerQuery
[ class tree: Net_GameServerQuery ] [ index: Net_GameServerQuery ] [ all elements ]

Class: Net_GameServerQuery_Process_Buffer

Source Location: /Net_GameServerQuery-0.3.0/Net/GameServerQuery/Process/Buffer.php

Class Overview


Provide an interface for easy manipulation of a server response


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 37]
Provide an interface for easy manipulation of a server response


[ Top ]


Method Detail

__construct (Constructor)   [line 70]

Net_GameServerQuery_Process_Buffer __construct( $data, string|array $response)

Constructor
  • Access: public

Parameters:

string|array   $response   —  The data
   $data   — 

[ Top ]

getBuffer   [line 93]

string|array getBuffer( )

Return data currently in the buffer
  • Return: The data currently in the buffer
  • Access: public

[ Top ]

getData   [line 82]

string|array getData( )

Return all the data
  • Return: The data
  • Access: public

[ Top ]

getLength   [line 104]

int getLength( )

Returns the number of bytes in the buffer
  • Return: Length of the buffer
  • Access: public

[ Top ]

read   [line 116]

string read( [int $length = 1])

Read from the buffer
  • Return: The data read
  • Access: public

Parameters:

int   $length   —  Length of data to read

[ Top ]

readAhead   [line 150]

string readAhead( [int $length = 1])

Read from the buffer
  • Return: The data read
  • Access: public

Parameters:

int   $length   —  Length of data to read

[ Top ]

readFloat32   [line 283]

int readFloat32( )

Read an float32 from the buffer
  • Return: The data read
  • Access: public

[ Top ]

readInt8   [line 272]

int readInt8( )

Read an int8 from the buffer
  • Return: The data read
  • Access: public

[ Top ]

readInt16   [line 260]

int readInt16( )

Read an int16 from the buffer
  • Return: The data read
  • Access: public

[ Top ]

readInt32   [line 248]

int readInt32( )

Read an int32 from the buffer
  • Return: The data read
  • Access: public

[ Top ]

readLast   [line 133]

string readLast( )

Read the last character from the buffer

Unlike the other read functions, this function actually removes the character from the buffer.

  • Return: The data read
  • Access: public

[ Top ]

readPascalString   [line 201]

string readPascalString( [ $offset = 0])

Reads a pascal string from the buffer
  • Return: The data read
  • Access: public

Parameters:

   $offset   — 

[ Top ]

readString   [line 178]

string readString( [string $delim = "\x00"])

Read from buffer until delimiter is reached

If not found, return everything

  • Return: The data read
  • Access: public

Parameters:

string   $delim   —  Read until this character is reached

[ Top ]

readStringMulti   [line 219]

string readStringMulti( array $delims, [ &$delimfound = null])

Read from buffer until any of the delimiters is reached

If not found, return everything

  • Return: The data read
  • Access: public

Parameters:

array   $delims   —  Read until these characters are reached
   &$delimfound   — 

[ Top ]

skip   [line 164]

void skip( [int $length = 1])

Skip forward in the buffer
  • Access: public

Parameters:

int   $length   —  Length of data to skip

[ Top ]

toFloat   [line 297]

float toFloat( string $string)

Conversion to float
  • Return: 32 bit float
  • Access: public

Parameters:

string   $string   —  String to convert

[ Top ]

toInt   [line 318]

int toInt( string $string, [int $bits = 8])

Conversion to integer
  • Return: Integer according to type
  • Access: public

Parameters:

string   $string   —  String to convert
int   $bits   —  Number of bits

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:39:46 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.