AvailableNetworkPortInput(Connection)

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

AvailableNetworkPortInput(Connection)

Post by RichAlgeni »

Syntax:

Result = AvailableNetworkPortInput(Connection)

Description:

Returns the number of remaining bytes in the specified client socket input buffer.

Useful for when a program needs to read data from a client connection multiple times, since calling ReceiveNetworkData blocks when no data is in the receive buffer.

Supported OS

All

Note: currently for Windows, I use the API function ioctlsocket_ to accomplish this.