Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Socket.AvailableBytes

Queries number of bytes in read buffer.

Component Version macOS Windows Linux Server iOS SDK
Socket 4.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Socket.AvailableBytes"; SocketID )   More

Parameters

Parameter Description Example
SocketID The socket ID received by Socket.Connect function. $sock

Result

Returns number or error.

Description

Queries number of bytes in read buffer.
May not work for SSL sockets.

The buffer size of the socket is managed by the OS and can be several megabytes big if needed.
Changed in v10.4 to return error if socket is closed or disconnected instead of zero.

Examples

Query available byte count:

MBS( "Socket.AvailableBytes"; $sock )

See also

Release notes

Blog Entries

This function checks for a license.

Created 11st September 2014, last changed 31st August 2020


Socket.AddMembership - Socket.Check