in reply to Tk & Socket: Tk::Error: fileno not same for read X and write Y
I don't get that error under Windows using ActivePerl (5.8.0, Tk 800.024) but the code still does not work correctly. I'll try and test it under RedHat 9 later.
The problem that I ran into is that, as pg pointed out, accept blocks. I also had the problem that the listening socket always triggers the readable event, whether a client is connecting or not. You can get around accept blocking by using select, but, then, why bother using fileevent at all? And since it appears to have issues, you'll probably be better off writing your own select code to poll the listening socket for data, and possibly the client socket as well.
bbfu
Black flowers blossom
Fearless on my breath
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Tk & Socket: Tk::Error: fileno not same for read X and write Y
by dotsha (Initiate) on Oct 15, 2003 at 07:20 UTC |