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

async-io-state-finish Function

Summary

Stops the current read operation in an async-io-state.

Package

comm

Signature

async-io-state-finish async-io-state &optional discard => unread-buffer-length

Arguments
async-io-state
discard
A positive integer or nil.
Values
unread-buffer-length
A non-negative integer.
Description

The function async-io-state-finish stops the current read operation in async-io-state, so no further calls to the async-io-state-read-with-checking callback will occur. If discard is non-nil, then it discards the first discard bytes from the internal buffer in async-io-state. The rest of the buffer is preserved for future reading.

async-io-state-finish must only be called inside the scope of the callback of async-io-state-read-with-checking. Once async-io-state-finish has been called, the callback must not access the buffer again and a new read operation can be started.

The return value unread-buffer-length is the remaining number of bytes in the buffer.

See also

async-io-state-read-with-checking
25.7.2 The Async-I/O-State API
25 TCP and UDP socket communication and SSL


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:26