Page 1 of 1

Unable to receive socket events

Posted: Thu Jul 15, 2010 7:51 am
by johnnie
Hi all,

I have been working on porting a application from Linux to windows. I am facing issues related to threads and sockets. I will explain the complete scenario here.

I have a server listening for the socket connections. The client is a static library which does two things. Establishes socket connection and creates a secondary thread. In secondary thread we again create a client socket for broadcasting.

The issue which I am facing is that the socket events are not received by the server. If there is only one socket, all the socket events are received by the server. But if there are two client sockets created, the INPUT event is not received by the server.


Please help me to get over this.

Regards
Johnnie

Posted: Fri Jul 16, 2010 3:38 am
by johnnie
Hi all,

Any solution ?

Regards
Johnnie Alan J

Posted: Mon Jul 19, 2010 7:26 am
by johnnie
Hi all,

After a long struggle I was able to figure out the issue. The issue was due to the sockets flags. The flags are set to SetFlags(wxSOCKET_BLOCK);.

After commenting this line out, every thing started to work fine.

Thanks for all help extended

Regards
Johnnie Alan J