Type: The main socket class. Sockets should be closed using the `socket-close' method.

(usocket:unsupported feature context &key minimum)

Type: Signalled when the underlying implementation doesn't allow supporting the requested feature. When you see this error, go bug your vendor/implementation developer!
Structure: Signalled when the underlying implementation doesn't allow supporting the requested feature. When you see this error, go bug your vendor/implementation developer!

(usocket:unimplemented feature context)

Type: Signalled if a certain feature might be implemented, based on the features of the underlying implementation, but hasn't been implemented yet.
Structure: Signalled if a certain feature might be implemented, based on the features of the underlying implementation, but hasn't been implemented yet.

usocket:ns-error

Type: Parent error for all name resolution errors.
Structure: Parent error for all name resolution errors.

(usocket:add-waiter wait-list input)

Undocumented

(usocket:socket-send usocket buffer length &key host port)

Function: Send packets through a previously opend `usocket'.

usocket:*auto-port*

Variable: Port number to pass when an auto-assigned port number is wanted.

Type: Parent condition for all name resolution conditions.
Structure: Parent condition for all name resolution conditions.

(usocket:socket-close usocket)

Function: Close a previously opened `usocket'.

(usocket:remove-waiter wait-list input)

Undocumented

usocket:*remote-host*

Undocumented

usocket:*remote-port*

Undocumented

(usocket:socket-stream object)

Undocumented

(usocket:socket-accept socket &key element-type)

Function: Accepts a connection from `socket', returning a `stream-socket'. The stream associated with the socket returned has `element-type' when explicitly specified, or the element-type passed to `socket-listen' otherwise.

Function: Bind to interface `host' on `port'. `host' should be the representation of an ready-interface address. The implementation is not required to do an address lookup, making no guarantees that hostnames will be correctly resolved. If `*wildcard-host*' is passed for `host', the socket will be bound to all available interfaces for the IPv4 protocol in the system. `port' can be selected by the IP stack by passing `*auto-port*'. Returns an object of type `stream-server-usocket'. `reuse-address' and `backlog' are advisory parameters for setting socket options at creation time. `element-type' is the element type of the streams to be created by `socket-accept'. `reuseaddress' is supported for backward compatibility (but deprecated); when both `reuseaddress' and `reuse-address' have been specified, the latter takes precedence.

Type: Error raised when there's no other - more applicable - error available.
Structure: Error raised when there's no other - more applicable - error available.

usocket:shutdown-error

Undocumented

usocket:stream-usocket

Type: Stream socket class. ' Contrary to other sockets, these sockets may be closed either with the `socket-close' method or by closing the associated stream (which can be retrieved with the `socket-stream' accessor).

Function: Connect to `host' on `port'. `host' is assumed to be a string or an IP address represented in vector notation, such as #(192 168 1 1). `port' is assumed to be an integer. `element-type' specifies the element type to use when constructing the stream associated with the socket. The default is 'character. Returns a usocket object.

usocket:*wildcard-host*

Variable: Hostname to pass when all interfaces in the current system are to be bound.

Type: Condition raised when there's no other - more applicable - condition available.
Structure: Condition raised when there's no other - more applicable - condition available.

(qlb-abcl:make-socket &rest args)

Undocumented

(usocket:get-peer-name socket)

Function: Returns the IP address and port of the peer the socket is connected to as values.

(usocket:get-peer-port socket)

Function: Returns the IP port of the peer the socket to.

(ql-ecl:socket-connect &rest args)

Undocumented

usocket:interrupted-condition

Undocumented

(usocket:wait-for-input socket-or-sockets &key timeout ready-only)

Function: Waits for one or more streams to become ready for reading from the socket. When `timeout' (a non-negative real number) is specified, wait `timeout' seconds, or wait indefinitely when it isn't specified. A `timeout' value of 0 (zero) means polling. Returns two values: the first value is the list of streams which are readable (or in case of server streams acceptable). NIL may be returned for this value either when waiting timed out or when it was interrupted (EINTR). The second value is a real number indicating the time remaining within the timeout period or NIL if none. Without the READY-ONLY arg, WAIT-FOR-INPUT will return all sockets in the original list you passed it. This prevents a new list from being consed up. Some users of USOCKET were reluctant to use it if it wouldn't behave that way, expecting it to cost significant performance to do the associated garbage collection. Without the READY-ONLY arg, you need to check the socket STATE slot for the values documented in usocket.lisp in the usocket class.

(usocket:make-wait-list waiters)

Undocumented

(usocket:get-local-port socket)

Function: Returns the IP port of the socket. This function applies to both `stream-usocket' and `server-stream-usocket' type objects.

(usocket:get-local-name socket)

Function: Returns the IP address and port of the socket as values. This function applies to both `stream-usocket' and `server-stream-usocket' type objects.

(ql-allegro:make-socket &rest args)

Undocumented

usocket:host-down-error

Undocumented

(usocket:host-byte-order address)

Undocumented

(ql-clisp:socket-connect &rest args)

Undocumented

usocket:ns-unknown-error

Type: Error raised when there's no other - more applicable - error available.
Structure: Error raised when there's no other - more applicable - error available.

usocket:no-buffers-error

Undocumented

(usocket:get-peer-address socket)

Function: Returns the IP address of the peer the socket is connected to.

(usocket:get-local-address socket)

Function: Returns the IP address of the socket.

usocket:insufficient-implementation

Type: The ancestor of all errors usocket may generate because of insufficient support from the underlying implementation with respect to the arguments given to `function'. One call may signal several errors, if the caller allows processing to continue.
Structure: The ancestor of all errors usocket may generate because of insufficient support from the underlying implementation with respect to the arguments given to `function'. One call may signal several errors, if the caller allows processing to continue.

(usocket:with-server-socket (var server-socket) &body body)

Function: Bind `server-socket' to `var', ensuring socket destruction on exit. `body' is only evaluated when `var' is bound to a non-null value. The `body' is an implied progn form.

Function: Find or create a STREAM that can be used for IO on SOCKET (which must be connected). Specify whether the stream is for INPUT, OUTPUT, or both (it is an error to specify neither). ELEMENT-TYPE and EXTERNAL-FORMAT are as per OPEN. TIMEOUT specifies a read timeout for the stream.

Function: Returns a HOST-ENT instance for HOST-NAME or signals a NAME-SERVICE-ERROR. HOST-NAME may also be an IP address in dotted quad notation or some other weird stuff - see gethostbyname(3) or getaddrinfo(3) for the details.