Next: , Previous: , Up: Networking Support   [Contents][Index]


10.5 Connecting

The task performed by the functions we present next is connecting to remote hosts.

Function: extensions:connect-to-inet-socket host port &optional kind &key :local-host :local-port

Tries to open a connection to the remote host host (which may be an IP address in host order, or a string with either a host name or an IP address in dotted format) on port port. Returns the file descriptor of the connection. The optional parameter kind can be either :stream (the default) or :datagram.

If local-host and local-port are specified, the socket that is created is also bound to the specified local-host and port.

Function: extensions:connect-to-unix-socket path &optional kind

Opens a connection to the unix “address” given by path. Returns the file descriptor of the connection. The type of connection is given by kind, which can be either :stream (the default) or :datagram.

Function: extensions:open-network-stream host port &key :buffering :timeout

Return a stream connected to the specified port on the given host.


Next: Out-of-Band Data, Previous: Accepting Connections, Up: Networking Support   [Contents][Index]