tcpcmd General Theory
If you're going to develop your own internet applications, it will be helpful for you to know a few things about the design and use of tcpcmd.
THIS PAGE CURRENTLY UNDER CONSTRUCTION
The Session Record
Throughout this discussion we'll use the terms session, stream, and connection. They all mean the same thing: an open tcp/ip connection to another computer, or, in the case of servers, an open tcp/ip port waiting to receive a connection. [Ed. note: I'll try to be more disciplined about using the same term throughout the documentation. Until then, you'll have to indulge me a bit in my writing style.]
tcpcmd stores pertinent information about the connection in a Frontier record.
This record contains at a minimum, the stream number, which is used internally by the ucmd code. The stream number is unique for each connection and is how the ucmd command keeps track of which stream to communicate on.
Other items may appear in the record, depending on the type of connection being used. For example, in an ftp command session, the record would contain the stream number, the ftp host address, the host port number, the local port number, the last host response and response code, the current user's default directory, the current working directory, etc.
In a server connection, the record contains the stream number and the thread id in which the listener connection is running. This is used by the server shutdown script to kill the thread.
TCP/IP client applications open streams using
tcpcmd.interfaces.openStream. After you're done using the stream, it is closed withtcpcmd.interfaces.closeStream.Nearly all tcpcmd verbs you use during a communications session require the address of this record as the first parameter. This enables the session record to be accessible to other processes and scripts.
THIS PAGE CURRENTLY UNDER CONSTRUCTION
![]()
This page was last built on 8/1/98; 10:28:42 PM ET by Alan German, asg@erols.com. At the moment, I am using Macintosh OS to work on this website. The "Electric Cactus" graphic is based on original artwork owned by UserLand Software and is used with their permission.