User guide
3.3. GLOBAL FUNCTIONS 63
res := sys(Sys
callc, c name2port, a1) CIN:y, POS:y, NAT:y
The name or decimals of a port is given in a1 and the resul t is its IP address or -1
if there is an error.
res := sys(Sys
callc, c newsocket) CIN:y, POS:y, NAT:y
The result is the file descriptor of a new socket or -1 i f there is an error.
res := sys(Sys
callc, c reuseaddr, a1, a2) CIN:y, POS:y, NAT:y
The file descriptor of a socket is given in a1. Id a2=1 the specified socket may be
reused. If there is an error the result is -1.
res := sys(Sys
callc, c setsndbufsz, a1, a2) CIN:y, POS:y, NAT:y
This sets t he send buffer size of socket a1 to a2 bytes. If there is an error the result
is -1.
res := sys(Sys
callc, c setrcvbufsz, a1, a2) CIN:y, POS:y, NAT:y
This sets the receive buffer size of socket a1 to a2 bytes. If there is an error the
result is -1.
res := sys(Sys
callc, c bind, a1, a2, a3) CIN:y, POS:y, NAT:y
This bind socket a1 to remote IP address a2 and remote port a3. If there is an
error the result is -1.
res := sys(Sys
callc, c tcpconnect, a1, a2, a3) CIN:y, POS:y, NAT:y
This make a TCP/IP connection through socket a1 to remote IP address a2 and
remote port a3. If there is an error the result is -1.
res := sys(Sys
callc, c tcplisten, a1, a2) CIN:y, POS:y, NAT:y
This causes socket a1 to wait for a TCP/IP connection to be requested by a remote
host. The maximum nu mbe r of connections waiting to be accepted is given in a2. If
there is an error the result is -1.
res := sys(Sys callc, c tcpaccept, a1) CIN:y, POS:y, NAT:y
This accepts a TCP/IP connection through socket a1. The result is the socket
number to be used for this connection or -1 if there is an error.
res := sys(Sys
callc, c tcpclose, a1) CIN:y, POS:y, NAT:y
This closes socket a1. The result is -1 if there is an error.
res := sys(Sys
callc, c fd zero, a1) CIN:y, POS:y, NAT:y
This clear every bit in the bit vector a1. The result is -1 if there is an err or.
res := sys(Sys
callc, c fd set, a1, a2) CIN:y, POS:y, NAT:y
This sets bit a1 in the bit vector a2. The result is -1 if there is an e r r or .
res := sys(Sys
callc, c fd isset, a1, a2) CIN:y, POS:y, NAT:y
This inspects bit a1 in the bit vector a2. The result is 1 if the bit was set an d 0
otherwise.