in reply to Tk & Socket: Tk::Error: fileno not same for read X and write Y
The overall design is not quite right. I cannot see the reason why Tk is involved here, at least base what you presented.
Now under this design, your program only accepts connections when fileevent is fired, which I believe is not what you want, as most likely the client comes any time it wishes. This shall really be a simple socket server side program without Tk.
When your program reaches that line accept socket connection, it just hangs until a client comes, this is not what should happen to a GUI application. This makes the person sitting before the computer really frustrated (at least when I was trying to play with your code).
Multi-threading might help you (one the other hand, most likely you would need multi-thread any way, or other similar technologies, for a socket server that expects multiple clients at a single given time), but still better reconsider whether Tk is needed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re2: Tk & Socket: Tk::Error: fileno not same for read X and write Y
by bbfu (Curate) on Oct 15, 2003 at 02:37 UTC |