Arguments |
address-family
- The address/protocol family of this socket. Currently only
:internet (the default), meaning IP, and
:file, referring to the UNIX domain addresses,
are supported.
type - One of
:stream (the default) to request a
connection-oriented socket, or
:datagram to request a connectionless
socket. The default is :stream
connect
-
This argument is only relevant to sockets of type
:stream. One of
:active (the default) to request a
connected file or TCP stream or :passive to
request a file or TCP 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 :stream
sockets for now, as :stream sockets are
currently always bivalent (i.e. they support both
character and byte I/O). For :datagram
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
remote-filename
- Required for file-socket streams, it specifies
the name of a file in the local filesystem (e.g.,
NOT mounted via NFS, AFP, SMB, ...) which names
and controls access to a UNIX-domain socket.
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.
local-filename - Required for
file-listener-sockets. Specifies the name of a file in
the local filesystem which is used to name a UNIX-domain
socket. The actual filesystem file should not
previously exist when the file-listener-socket is
created; its parent directory should exist and be
writable by the caller. The file used to name the
socket will be deleted when the file-listener-socket
is closed.
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.
|