SOCKET LASTERROR()

From Lianjapedia
Jump to: navigation, search

Purpose

Function to return the error number of the last socket operation error

Syntax

SOCKET_LASTERROR()

See Also

ACLASS(), ADDPROPERTY(), AMEMBERS(), COMPOBJ(), CREATEOBJECT(), DEFINE CLASS, DISPLAY CLASSES, DODEFAULT(), FOREACH, JSON_DECODE_FILE(), JSON_ENCODE(), LIST CLASSES, LOADOBJECT(), NEWOBJECT(), OBJECT(), PRINT_JSON(), PRINT_HTML(), PRINT_R(), PRINT_XML(), REMOVEPROPERTY(), REQUIRE_ONCE(), SAVEOBJECT(), SELECT, SOCKET_CLOSE(), SOCKET_OPEN(), SOCKET_PEEK(), SOCKET_READ(), SOCKET_SERVER(), SOCKET_WRITE(), WITH, XML_DECODE_FILE()

Description

The SOCKET_LASTERROR() function is used to return the error number of the last socket operation error. If no error has occurred, SOCKET_LASTERROR() returns 0.

Example

// check the socket operation
if socket_lasterror() != 0
    // remote server connection failed, try reconnecting
endif