Server help
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Server help

From: Ray <ray.mosley@gmail.com>
Date: Wed Jun 29 2005 - 03:22:20 CEST

I am using Tcl 8.3. I copied the code from
http://www.tcl.tk/scripting/netserver.html, and saved it as
serverLib.tcl.

I start two tclsh session; in one tclsh (W1) I enter
   source serverLib.tcl
   set s [socket -server EchoAccept 2540]
and the socket is operned

In the other tclsh window (W2) I enter
   source serverLib.tcl
   set s [Echo_Client localhost 2540]
the socket is opened

Still following the example, in W2 I enter
   puts $s "Hello"
   gets $s line
Here is hangs - no response until I go to W1 and
enter
   close $s
or
   set forever 1

I get the prompt back in W2 until I force a close or exit in W1.

What am I doing wrong? The example seems so easy.
Received on Thu Sep 29 14:23:30 2005