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

with-noticed-socket-stream Macro

Summary

Evaluates body with stream "noticed" for input.

Package

comm

Signature

with-noticed-socket-stream (stream) &body body

Arguments
stream
A stream created using open-tcp-stream.
body
Code to be executed while the stream is "noticed".
Description

The macro with-noticed-socket-stream evaluates the forms in body with the stream stream "noticed" for input. stream becomes unnoticed afterwards.

The macro is designed to be used with streams created by open-tcp-stream.

Notes
  1. You do not normally need to use this macro, because all of the standard functions that read from socket streams (read-char and so on) will do this automatically when necessary. However, if you call process-wait yourself with a wait-function that detects new input from a socket stream, then this macro is necessary to cause LispWorks to evaluate the wait-function when there is input on the underlying socket. Without that, there might be a delay before the thread responds to the input.
  2. with-noticed-socket-stream is not implemented on the Windows platform.
See also

open-tcp-stream
25 TCP and UDP socket communication and SSL


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