Arguments |
address-family
- The address/protocol family of this socket. Currently only
:internet (the default), meaning IP, is
supported.
type
- One of :stream (the default) to request a TCP
socket, or :datagram to request a UDP socket. The
default is :stream
connect
- This argument is only relevant to TCP sockets. One of
:active (the default) to request
a connected tcp stream or :passive to request a
listener socket.
eol
- This argument is currently ignored (it is accepted for compatibility
with Franz Allegro).
format
- One of :text (the default),
:binary,
or :bivalent. This argument is
ignored for TCP sockets for now, as TCP sockets are
currently always bivalent (i.e. they
support both character and byte I/O). For UDP sockets, the
format determines the type of buffer created by
receive-from.
remote-host
- Required for TCP streams, it specifies the host to
connect to (in any format acceptable to
lookup-hostname). Ignored for listener sockets. For
UDP sockets, it can be used to specify a default host
for subsequent calls to sent-to or
receive-from
remote-port
- Required for TCP streams, it specifies the port to
connect to (in any format acceptable to lookup-port).
Ignored for listener sockets. For UDP sockets, it can
be used to specify a default port for subsequent calls
to sent-to or
receive-from
local-host
- Allows you to specify a local host address for a
listener or UDP socket, for the rare case where you want to
restrict connections to those coming to a specific
local address for security reasons.
local-port
- Specify a local port for a socket. Most useful for listener
sockets, where it is the port on which the socket will listen
for connections.
keepalive
- If true, enables the periodic transmission of
"keepalive" messages.
reuse-address
- If true, allows the reuse of local ports in listener
sockets, overriding some TCP/IP protocol specifications.
You will need this if you are debugging a server..
nodelay
- If true, disables Nagle's algorithm, which tries to minimize
TCP packet fragmentation by introducing transmission delays in
the absence of replies.
Try setting this if you are using a protocol which involves sending a
steady stream of data with no replies and are seeing significant
degradations in throughput.
broadcast
- If true, requests permission to broadcast datagrams
on a UDP socket.
linger
- If specified and non-nil, should be the number of
seconds the OS is allowed to wait for data to be
pushed through when a close is done. Only relevant
for TCP sockets.
backlog
- For a listener socket, specifies the number of
connections which can be pending but not accepted.
The default is 5, which is also the maximum on some
operating systems.
|