Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4   13.5    Statistic    FMM    Blog  

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

💬 Ask a question or report a problem