chickadee » bokbok » request!

request! con messageprocedure

Sends the message (an arbitrary sexpr) as a request to the other end of the connection, and blocks waiting for a response. This is thread-safe - multiple threads may call request! on the same connection in parallel, and although the connection is blocked while a request is being sent or a response received, it is not blocked while a request is being processed at the other end, and responses may come back in a different order to the requests sent.

If the request fails for networky reasons, a suitable error is raised; if the request handler at the far end fails, a remote error is raised.