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) ?
Thanks!
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:
(open-tcp-server (list port-number: 22222 buffering: 'line))
to get "line buffering", or use #f for no buffering (this may be really slow as each character is sent individually).
Marc