srt-rfc icon indicating copy to clipboard operation
srt-rfc copied to clipboard

Define socket ID ranges

Open maxsharabayko opened this issue 4 years ago • 0 comments

Define ranges of valid Socket ID values.

  • Value 0. Reserved for handshake procedure. If the destination Socket ID is 0 (destination Socket ID unknown) the packet will be sent to the listening socket or to a socket that is in the rendezvous connection phase.

  • [1; 2^30). Single socket ID range.

  • (2^30; 2^31). Group socket ID range. Effectively any positive number from [1; 2^30) with bit 30 set to 1.

The most significant bit 31 (sign bit) is left unused so that checking for a value <= 0 identifies an invalid socket ID.

Some of those ranges are the SRT library limitations. The SRT protocol can potentially use the whole range except for 0 and -1.

maxsharabayko avatar Feb 17 '21 15:02 maxsharabayko