diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-05-31 20:28:57 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-06-10 14:00:34 +1000 |
commit | c46fde880b6d3f9eef24e8dd1ab7bc3f6a8a0f18 (patch) | |
tree | cec487099b56288a73528ae30ec5855cefefdc91 /examples/tcp.server | |
parent | f2524e6687ac64d1e1a6bbaa9d07c30236b61df1 (diff) | |
download | jimtcl-c46fde880b6d3f9eef24e8dd1ab7bc3f6a8a0f18.zip jimtcl-c46fde880b6d3f9eef24e8dd1ab7bc3f6a8a0f18.tar.gz jimtcl-c46fde880b6d3f9eef24e8dd1ab7bc3f6a8a0f18.tar.bz2 |
Add aio support for buffering
And fconfigure for Tcl compatibility
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'examples/tcp.server')
-rw-r--r-- | examples/tcp.server | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/tcp.server b/examples/tcp.server index ef71fe5..1e400fb 100644 --- a/examples/tcp.server +++ b/examples/tcp.server @@ -11,6 +11,8 @@ $s readable { if {[os.fork] == 0} { $s close + $sock buffering line + # Get the request (max 80 chars) - need the source address while {[$sock gets buf] >= 0} { set buf [string trim $buf] @@ -26,7 +28,6 @@ $s readable { # Send the result back to where it came from $sock puts $result - $sock flush } } |