Page 1 of 1

C backend network receive buffer length command

Posted: Tue Jan 31, 2023 9:59 pm
by RichAlgeni
For Windows code, we can currently use the following to get the number of bytes in the network receive buffer:

Code: Select all

socketHandle = ConnectionID(socketNumber)
result       = ioctlsocket_(socketHandle, #FIONREAD, @length)
Where length is a long, and contains the number we need.

Could we get a native PB6 command to do this instead? For example:

Code: Select all

bytesAvailable.l = AvailableNetworkData(Connection.l)