[Q] BitStream & RakNet

ejexter

Well-known member
Joined
Feb 21, 2014
Messages
211
Reaction score
0
Someone can explain me what is it BitStream and what Difference BitStream from Raknet  :yuno:

and don't give links for wiki cuz i read this and i don't understand any shit  :red_eyes:
 

0xf0rd

Active member
Joined
Jun 20, 2014
Messages
68
Reaction score
1
First why is under CLEO -> Help. I think its in the wrong section.

RakNet is basically a multiplayer game engine, its an API used to create clients and servers for multiplayer games such as SA-MP for GTA San Andreas.

BitStream is just a stream of bits used in RakNet to hold packets then a person can send this bitstream using the RakNet interface if there is a valid connection.

Here is an example from the RakSAMP client source.

Code:
	RakNet::BitStream bsSend;
	BYTE byteTextLen = strlen(szMessage);
	bsSend.Write(byteTextLen);
	bsSend.Write(szMessage, byteTextLen);
	pRakClient->RPC(&RPC_Chat, &bsSend, HIGH_PRIORITY, RELIABLE, 0, FALSE, UNASSIGNED_NETWORK_ID, NULL);

This code will send a message to the chat in SAMP, here we are writing the packet with correct sequence to the bitstream then we are sending it using the RakNet interface.
 
Top