GetLastSocketError (open)

Get the last error on a TCP/IP socket

Syntax

LOADLIB "wh::internet/tcpip.whlib";

INTEGER FUNCTION GetLastSocketError(INTEGER connectionid)

Parameters

INTEGER connectionid

Integer connectionid to use

Return value

INTEGER

Integer with last error at this connection (if exists) Error codes: 0: nothing went wrong -1: a not (yet) supported error -2: the socket/connection has been gracefully closed -3: there was no connection -4: address already in use -5: there is still data left to be sent -6: message too big for underlying protocol -7: destination unreachable -8: connection refused or aborted -9: a time limited call timed out -10: the socket was already connected -11: invalid argument, or invalid action for this socket state/type -12: the socket/connection has already been disconnected -13: The call would block -14: Connecting is already in progress -15: Tis operation requires a nonblocking socket -16: Unable to resolve hostname