/*** int TCPSocket::peekByte(void) ** int TCPSocket::peekByte(size_t index) ** ** Synopsis: ** Gets the indicated byte from the socket buffer without removing the byte from the socket. ** ** Parameters: ** index Zero based index of the byte withing the socket to return, should be less than what Available returns ** ** pStatus A pointer to receive the status of the call, usually the connection status, or an index out of bounds error. ** ** Return Values: ** The actual byte, casted to an integer. -1 is returned if no byte was returned or an error occured. ** ** Errors: ** Index out of bounds, or a connection error. ** ** Notes: ** ** This call is safe to make without checking the connection status. ** */ int TCPSocket::peekByte(void) { return(peekByte(0)); }
/*** int TcpClient::peekByte(void) ** int TcpClient::peekByte(size_t index) ** ** Synopsis: ** Gets the indicated byte from the socket buffer without removing the byte from the socket. ** ** Parameters: ** index Zero based index of the byte withing the socket to return, should be less than what Available returns ** ** pStatus A pointer to receive the status of the call, usually the connection status, or an index out of bounds error. ** ** Return Values: ** The actual byte, casted to an integer. -1 is returned if no byte was returned or an error occured. ** ** Errors: ** Index out of bounds, or a connection error. ** ** Notes: ** ** This call is safe to make without checking the connection status. ** */ int TcpClient::peekByte(void) { return(peekByte(0)); }
int8 Script::peekInt8(int32 offset) { return (int8) peekByte(offset); }
byte QByteArrayBuilder::getByte(){ dword b = peekByte(); if (length() >= 1) pointer += 1; //remove(0, 1); return b; }
char Script::peekChar(int32 offset) { return (char) peekByte(offset); }