Next Previous Up Top Contents Index

10.4.6 The <TCP-SOCKET> class

<tcp-socket>

Class

Superclasses: <buffered-socket>
The class of TCP client sockets.
Keywords:

Of the keywords below, host: and one of either service: or port: are required.
host:

An instance of <internet-address> or <string>. The remote host to connect to. The <string> may be either a host name or a presentation-form Internet address. Required.

service:

An instance of <string>. A <string> containing an abstract name for a service with a "well-known" port, such as "ftp" or "daytime". Valid names depend on the configuration of the DNS. Required unless port: is supplied.

protocol:

An instance of <string> naming the protocol. Currently #"tcp" and #"udp" are the only supported protocols. You can create instances of protocol-specific subclasses as an alternative to using the protocol: keyword. For example make(<socket>, protocol: #"tcp", ...) is equivalent to make(<TCP-socket>, ...). make on <socket> returns an instance of <tcp-socket> by default.

port:

An instance of <integer> representing the remote port to connect to. Required unless service: is supplied.

element-type:

An instance of <class>. Useful values for <tcp-streams> are <byte-character> and <byte>. This keyword is an inherited streams class keyword. See Chapter 5, "The Streams Module" for a full description.


System and I/O Reference - 31 MAR 2000

Next Previous Up Top Contents Index