|SDLNet_CheckSockets segmentation fault [message #872231]
||Tue, 15 May 2012 18:02
| Ramkumar Sivaraman
Registered: May 2012
I am using SDLNet_Library 1,2 to make TCP connections on the client side. Everything works fine. Client able to make connections successfully, and send and receive packets.
But as soon as server disconnects, i receive segmentation fault from this function,
I open TCP port using SDLNet_TCP_Open() in a seperate worker thread where as I use SDLNet_CheckSockets() in the main thread. All my sockets and socketsets are global variables, so they are accessible in both threads. Please let me know why the segmentation fault occurs.
However, when I open TCP ports and check sockets in the main thread and when I close server, this fault does not occur. But I have to use a seperate thread for TCP open as SDLNet_TCP_Open() waits for couple of minutes before timeouts if remote host not found.
I can provide more information on this.
Thanks in advance.
Powered by FUDForum
. Page generated in 0.01540 seconds