source/Socket.cpp
byteLen_t xiSocket::ReadInt16( const char * const buffer, void * const varptr ) {
	const byteLen_t size = sizeof( uint16_t );

	uint16_t num = *( uint16_t * )buffer;
	num = ( uint16_t )Endian::NetworkToHostUnsigned( num, size );

	memcpy( varptr, &num, size );

	return size;
}
/*
====================
xiSocket::ReadInt16

	Function for reading 2 bytes from a given buffer
	The bytes are stored in varptr
====================
*/
:ReadInt16
Function for reading 2 bytes from a given buffer
The bytes are stored in varptr
: ReadInt16 Function for reading 2 bytes from a given buffer The bytes are stored in varptr
byteLen_t xiSocket::ReadInt16( const char * const buffer, void * const varptr ) {
	const byteLen_t size = sizeof( uint16_t );
	uint16_t num = *( uint16_t * )buffer;
	num = ( uint16_t )Endian::NetworkToHostUnsigned( num, size );
	memcpy( varptr, &num, size );
	return size;
}
byteLen_t xiSocket :: ReadInt16 ( const char * const buffer , void * const varptr ) { const byteLen_t size = sizeof ( uint16_t ) ; uint16_t num = * ( uint16_t * ) buffer ; num = ( uint16_t ) Endian :: NetworkToHostUnsigned ( num , size ) ; memcpy ( varptr , & num , size ) ; return size ; }
xiSocket::ReadInt16
Function for reading 2 bytes from a given buffer
The bytes are stored in varptr
xiSocket :: ReadInt16 Function for reading 2 bytes from a given buffer The bytes are stored in varptr