Version: 2.0d7
Release Date: November, 1997
Expires no later than: January 31, 1997
Important: THIS DOCUMENTATION IS INCOMPLETE AND PROBABLY A BIT INACCURATE
It is subject to change as the API matures.
Feedback and contributions are encouraged:
grantcgi@list.nisto.com
or grant@kagi.com
Warning: THE TCP CODE FOR CGI APPLICATIONS IS COMPLETELY UNTESTED!
You are strongly encouraged to wait for the next release before using
the tcp code when compiling as a CGI application!
It is safe to use when compiling as a WebSTAR (W*API) Plug-In.
CGIErr TCPOpenClientStream ( APIData apidata, UInt32 serverIP, UInt16 serverPort, TCPPtr *tcpData )
Attempt to open a client TCP/IP connection to a host machine.
serverIP
serverPort
tcpData
CGIErr TCPListenStart ( APIData apidata, UInt16 port, UInt16 maxConnections, UInt32 suggestedSize, TCPPtr *tcpData )
Open a TCP listener on the specified port.
port
maxConnections
suggestedSize
tcpData
CGIErr TCPListenStop ( APIData apidata, TCPPtr tcpData )
Stop a listener (that you previously set up using TCPListenStart). Halts any active connections from this listener.
CGIErr TCPCloseStream ( APIData apidata, TCPPtr tcpData )
Close an open connection on a TCP stream.
CGIErr TCPWriteToStream ( APIData apidata, void *dataToSend, UInt32 dataLength, TCPPtr tcpData )
Read data onto an open TCP stream.
dataToSend
dataLength
CGIErr TCPGetStreamStatus ( APIData apidata, TCPStreamStatus *outStatus, UInt32 *bytesUnread, TCPPtr tcpData )
Get status information on the stream.
outStatus
bytesUnread
CGIErr TCPNameToIPAddress ( APIData apidata, char *name, UInt32 *ipAddress )
Get the long integer (4 byte) IP address for a given domain name.
name
ipAddress
CGIErr TCPIPAddressToName ( APIData apidata, UInt32 ipAddress, char *domainName )
Get the domain name (or IP addr) string for the 4 byte IP address.
ipAddress
domainName