On Sun, 3 Mar 2002, Mo wrote:
[ please set your word wrap to something < 75, thanks! ]
>hi all,
>first of all, thanks for the new release mattia.
>i got a question about wx::process. i'm programming a telnet
> client for a telnet game right now, so i constantly get some the output
> of the server which i append to the main textctrl. now, after the server
i am connected to is done sending stuff and waiting for input, the
> whole program doesn't react anymore which is logic since this is the
> main
> process. so i used Wx::Yield first which works while the server is
> sending stuff, but when it stops then the whole script freezes again.
> then i tried the new Wx::Process, but couldn't really figure out (out of
> the examples) how to use it with a subroutine.
> Wx::Process(&Sub, -1);
There is no way: wxProcess if for external programs
>gives no error message and i still get all the output, but then again
> it freezes when the server waits for input. i'm using a the latest
> wx-version, lastest activestate perl and to connect IO::Socket (and that
> all together on a WinME machine).
BTW if you are using telnet you should probably use Net::Telnet,
but that is not what is causing you problems
Why not use select() ( the 3-argument version ) or non-blocking sockets?
I used the 2nd solution a lot of time ago ( in a pure perl program )
and it worked fine.
Regards
Mattia
|