TcpGetState()


TcpGetState(connection)

This function returns the state of any TCP connection. TcpGetState(n) is mainly used to determine if the TCP connection was made successfully and if connection was lost after a write operation.


The following values are returned by this function:


0 - Connection closed.
1 - Connection open.
2 - Connection failed.
3 - Connection lost.


States 1 and 2 occur directly after an TCPOpen command and require a TCPClose to clear. State 3 may occur after a TCPWrite command.




TcpOpen


TcpClose


TcpGetError$()


TCPGetAddr$()


TcpGetSize()


TcpRead


TcpReadln


TcpReadUTF


TcpWrite


TcpWriteln


TcpWriteUTF







Become a Patron