Name
ses_read, ses_can_read_char — read raw bytes from a connected session socket
Synopsis
any ses_read(
|
inout session any, |
in length integer); |
integer ses_can_read_char(
|
inout session any); |
Description
ses_read reads up to length
bytes from session (a connected session handle
produced by
ses_accept,
http_client, or
the SMTP/IMAP client BIFs) and returns them as a binary string. Reads less
than length bytes if the socket has nothing more to
deliver right now. Returns SQL NULL on EOF.
ses_can_read_char returns 1 if at least one byte is
immediately available on session without blocking,
0 otherwise. Use it inside a polling loop to drain a socket without timing
out on an idle peer.