Next Previous Up Top Contents Index

10.4.7 The <UDP-SOCKET> class

<udp-socket>

Class

Superclasses: <buffered-socket>
The class of UDP 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: #"udp", ...) is equivalent to make(<UDP-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 <udp-socket>s 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