Asynchronously writes a buffer to an async-io-state.
comm
async-io-state-write-buffer async-io-state buffer callback &key start end timeout error-callback user-info
|   async-io-state⇩  |    
An async-io-state.  | 
|   buffer⇩  |    
A cl:base-string or an 8-bit cl:simple-array.  | 
|   callback⇩  |    
A function designator for a function of 3 arguments.  | 
|   start⇩  |    
A lower bounding index designator for buffer.  | 
|   end⇩  |    
An upper bounding index designator for buffer.  | 
|   timeout⇩  |   nil or a positive real. | 
|   error-callback⇩  |    
A function designator for a function of 3 arguments, or  nil. | 
|   user-info⇩  |    
A Lisp object.  | 
The function async-io-state-write-buffer asynchronously writes the part of buffer buffer between indexes start and end to async-io-state. When this writing has succeeded or the state's async-io-state-write-timeout has passed, callback is called like this:
callback async-io-state buffer number-of-bytes-written
The default value of start is 0. The default value of end is the length of buffer.
If an error occurs during the I/O operation and error-callback is non-nil, then error-callback is called with these same arguments:
error-callback async-io-state buffer number-of-bytes-written
If error-callback is nil, then callback is called, so it should check for errors using async-io-state-write-status.
If the operation does not finish within the state's async-io-state-write-timeout period then the state's async-io-state-write-status is set to :timeout and callback is called.
If timeout or user-info are supplied then they set the state's async-io-state-write-timeout and async-io-state-user-info for this and subsequent operations.
callback and error-callback are called in the same process that processes the wait-state-collection of async-io-state (see 25.8.3 Writing callbacks in Asynchronous I/O operations).
async-io-state-read-buffer
async-io-state-read-with-checking
25.8.2 The Async-I/O-State API
25 TCP and UDP socket communication and SSL
LispWorks® User Guide and Reference Manual - 18 Feb 2025 15:32:11