Proclus has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,
I'm working on a wxWidget application which communicates with a POE::Component::TCP::Server based commandline application.

The client GUI app has a main POE session which also spawns a POE::Component::TCP::Client. The client is not connecting to the server.
If I get rid of GUI code along with POE::Loop::Wx, it works.

Is there something wrong with Loop::Wx? Or should I apply some other magic to make the TCP::Client work under Loop::Wx?

Thanks guys.
  • Comment on POE::Component::TCP::Client not working in wxWidgets Application

Replies are listed 'Best First'.
Re: POE::Component::TCP::Client not working in wxWidgets Application
by rcaputo (Chaplain) on Feb 11, 2010 at 00:26 UTC
      Hi Rocco,
      I have not submitted a bug report yet.
      I am doing more testing and just used POE::Wheel::SocketFactory to create the client in the WX app.
      It connects to the server created buy another POE::Wheel::SocketFactory based executable, but client does not fire SuccessEvent. Server's SuccessEvent gets called.

      Again with another process with the normal POE Loop, it's working as expected.

      I thought the info would be enough for someone who had the same problem before. The OS is Windows 7, when I have some time, I will test in Linux as well. Bad things are happening only on Windows!
Re: POE::Component::TCP::Client not working in wxWidgets Application
by swares (Monk) on Jun 11, 2010 at 21:17 UTC
    Using POE::Component::DNS, DNSBL, Whois, HTTP. I am having the same sort of problem I suspect. Running on Suse Linux. In testing I found if I call the client functions from _start they work, if called from a button press event in the wx event loop the poe event is run but the response does not make it back to the response handler for the event. Turned on some debugging and it looked like it might be returned to the wrong session... could be wrong. Couldn't find much documentation, used example 3 for my base code. No luck so far.