<nNewSocket> TCPACCEPT(<nSock>[, <nTimeout>]) TRUE || FALSE TCPCLOSE(<nConnection>) <nConnection> TCPCONNECT(<sHostName>[, <nPort>][, <nTimeout>]) <nErrNo> TCPLISTEN(<nPort>[, <nBackLog>]) <nLenBuf> TCPREAD(<nConnection>, @<sBuffer>, <nLen>[, <nTimeout>]) <nLenBuf> TCPWRITE(<nConnection>, <sBuffer>, <nLen>[, <nTimeout>])
TCPACCEPT(<nSock>[, <nTimeout>]) --> <nNewSocket>
TCPACCEPT() extracts the first connection request on the queue of pending connections, creates a new connected socket with mostly the same properties as <nSock>, and allocates a new file descriptor <nNewSocket> for the socket, which is returned.
FERROR() and FERRORSTR()kept the error description.
TCPCLOSE(<nConnection>) --> TRUE || FALSE
TCPCLOSE() closes opened connections and returns TRUE if operation was successfully.
<nConnaction> | Numeric, is the connection number. |
Returns : | Returns TRUE if connection was successfully closed. |
See also : | TCPCONNECT() TCPLISTEN() |
TCPCONNECT(<sHostName>[, <nPort>][, <nTimeout>]) --> <nConnection>
TCPCONNECT() makes connect to server <sHostName> and creates socket to port <nPort>. Returns connection number <nConnection> or -1 on error. FERROR() and FERRORSTR()kept the error description.
TCPLISTEN(<nPort>[, <nBackLog>]) --> <nErrNo>
TCPLISTEN() creates socket and stands for incomming connections.
TCPREAD(<nConnection>, @<sBuffer>, <nLen>[, <nTimeout>]) --> <nLenBuf>
TCPREAD() reads from connection <nConnection> some data (no more of <nLen> bytes) and writes it to buffer <sBuffer>. FERROR() and FERRORSTR()kept the error description.
TCPWRITE(<nConnection>, <sBuffer>, <nLen>[, <nTimeout>]) --> <nLenBuf>
TCPWRITE() trys write some data <sBuffer> (with length <nLen> bytes)to connection <nConnection>. FERROR() and FERRORSTR()kept the error description.