All Manuals > LispWorks User Guide and Reference Manual > 32 The COMM Package

NextPrevUpTopContentsIndex

async-io-state-send-message-to-address

Function
Summary

Asynchronously sends a message on an unconnected socket.

Package

comm

Signature

async-io-state-send-message-to-address (async-io-state hostspec service buffer callback &key start end timeout error-callback user-info)

Arguments

async-io-state

An async-io-state.

hostspec, service

Specify the socket address to send to in the standard way.

buffer

A cl:base-string or an 8-bit cl:simple-array.

callback

A function designator for a function of 1 argument.

start

A lower bounding index designator for buffer.

end

An upper bounding index designator for buffer.

timeout

nil or a non-negative real.

error-callback

A function designator.

user-info

A Lisp object.

Values

None.

Description

The function async-io-state-send-message-to-address asynchronously sends a message from buffer between start and end to the socket address which is specified by hostspec and service. For the interpretation of hostspec and service see Specifying the target for connecting and binding a socket.

The default value of start is 0. The default value of end is the length of buffer.

The socket in async-io-state must not be connected. When the sending is successful, callback is called with async-io-state as its only argument.

error-callback, timeout, start, end and user-info have the same meaning as in async-io-state-write-buffer.

Notes
  1. async-io-state-send-message-to-address is typically used only with an async-io-state containing a UDP socket, created by create-async-io-state-and-udp-socket, create-async-io-state-and-connected-udp-socket or calling create-async-io-state with udp non-nil.
  2. The contents of buffer must not be changed until callback has been called.
  3. If hostspec is a host name (that is a string not specifying an IP address), then async-io-state-send-message-to-address uses the family of the socket to decide whether to look for IPv6 or IPv4 addresses. If async-io-state was created by create-async-io-state, the ipv6 argument to create-async-io-state must match the family of the socket for async-io-state-send-message-to-address to work.
  4. For connected UDP sockets, use async-io-state-send-message.
See also

create-async-io-state-and-connected-udp-socket
async-io-state-receive-message
async-io-state-send-message
The Async-I/O-State API


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex