[gambit-list] thread input/output to port
feeley at iro.umontreal.ca
Wed Oct 14 18:45:53 EDT 2009
On 2009-10-14, at 3:32 PM, lowly coder wrote:
> Got it working. Thanks!
> One question -- why is it that with printing to stdin, I don't need to
> use (force-output), whereas after I redirect to tcp ports, I seem to
> have to use (force-output) even after (newline) ?
That's because the default buffering mode for stdout is #f (no
buffering). For tcp ports the default buffering is #t (fully
buffered). You can change it like this:
(list port-number: 22222
to get "line buffering", or use #f for no buffering (this may be
really slow as each character is sent individually).
More information about the Gambit-list