The connection information record is used as a parameter in several
of the procedure calls. It enables you and the TCP/IP program
to exchange information about the connection. The Pascal declaration
is shown in Figure 1.
Figure 1. Pascal declaration of connection
information record StatusInfoType =
record
Connection: ConnectionType;
OpenAttemptTimeout: integer;
Security: SecurityType;
Compartment: CompartmentType;
Precedence: PrecedenceType;
BytesToRead: integer;
UnackedBytes: integer;
ConnectionState: ConnectionStateType;
LocalSocket: SocketType;
ForeignSocket: SocketType;
end;
- Connection
- A number identifying
the connection that is described. This connection number is different
from the connection number displayed by the NETSTAT command.
- OpenAttemptTimeout
- The number of seconds
that TCP continues to attempt to open a connection. You specify this
number. If the limit is exceeded, TCP stops trying to open the connection
and shuts down any partially open connection.
- BytesToRead
- The number of data bytes received
from the foreign host by TCP, but not yet delivered to the client.
TCP maintains this value.
- UnackedBytes
- The number of bytes sent by
your program, but not yet sent to the foreign TCP, or the number of
bytes sent to the foreign TCP, but not yet acknowledged.
- ConnectionState
-
The current state of the connection. ConnectionStateType defines the client
program view of the state of a TCP connection, in a form more readily
usable than the formal TCP connection state defined by RFC 793.
- LocalSocket
- The local internet address and
local port. Together, these form one end of a connection. The foreign
socket forms the other end. See Figure 2 for the Pascal declaration of the SocketType record.
- ForeignSocket
- The foreign, or remote, internet
address and its associated port. These form one end of a connection.
The local socket forms the other end. Figure 2 shows the Pascal declaration of a socket type.
Figure 2. Pascal declaration of socket type InternetAddressType = UnsignedIntegerType;
PortType = UnsignedHalfWordType;
SocketType =
record
Address: InternetAddressType;
Port: PortType;
end;
- Address
- The internet address.
- Port
- The port.