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

Socket.LastError

Queries the last error code for the given socket.

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

Parameters

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

Result

Returns error code.

Description

Queries the last error code for the given socket.
This is normally a platform dependent error code.
On macOS error code is 9 in use the socket is closed, on Windows 10009.

See also

Blog Entries

This function is free to use.

Created 18th August 2014, last changed 31st August 2020


Socket.IsListening - Socket.LastMessageIP