Racinfo
WebSocket Real Address Chat Protocol
WRAC (WebSocket Real Address Chat) is a community-made successor to RAC that uses WebSockets instead of TCP. It uses the same requests as RAC, but you should send data in binary format. Unlike regular RAC, you can use the same connection multiple times—in RAC, you had to reconnect to the server for every request. This changes how message receiving works.
Receiving messages
Since the connection can now be kept alive and WebSocket uses messages for transactions, we can’t retrieve messages the same way as in RAC.
Receiving messages in WRAC is done by sending a single packet to the server with two bytes. The first byte is 0x00
, which indicates that you want to receive messages, and the second byte is either 0x01
or 0x02
. These two bytes work the same way as in RAC.