Length-Value Frames
CrystalC2's UDC2 listener expects data to be written and read as length-value (LV) frames, where the length is in little-endian format.
The read/write cycle on your 3rd party listener server should resemble the following:
Receive incoming data from Beacon.
Connect to the UDC2 listener.
Write the 4-byte length of incoming data.
Write the incoming data.
Read the 4-byte data length from the UDC2 listener.
Read the outgoing data for Beacon.
Relay the outgoing data to Beacon.
Disconnect from the UDC2 listener.
The UDC2 listener does not require you to maintain TCP sessions.
Last updated