Did you know ... Search Documentation:
Pack canny_tudor -- prolog/canny/hdx.pl
PublicShow source
 hdx(+StreamPair, +Term, -Codes, +TimeOut) is semidet
 hdx(+In, -Codes, +TimeOut) is semidet
 hdx(+Out, +Term) is semidet
Performs a single half-duplex stream interaction with StreamPair. Flushes Term to the output stream. Reads pending Codes from the input stream within TimeOut seconds. Succeeds when a write-read cycle completes without timing out; fails on time-out expiry.

Filling a stream buffer blocks the calling thread if there is no input ready. Pending read operations also block for the same reason. Hence the wait_for_input/3 must precede them.

StreamPair- connection from client to server, a closely-associated input and output stream pairing used for half-duplex communication.
Term- to write and flush.
Codes- waited for and extracted from the pending input stream.
TimeOut- in seconds.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 hdx(Arg1, Arg2, Arg3)
 hdx(Arg1, Arg2)