|
I didn't see this come through on my side... sorry if it's a repost...
I got your original message, and it's also in the archives: http://archive.midrange.com/rpg400-l/200605/msg00675.html
Now, the socket creates successfully and returns a descriptor. But, on the connect it times out. Now we close the socket (which if I understand correctly closes any open connection and destroys the socket).
That's correct.
What happens, though, if there is no connection? I assume all that happens is the socket is destroyed.
That's correct.
But, in this case, it seems that it is closing a _different_ socket (a client application that is running along with the web service client).
That doesn't make sense, and shouldn't happen. Sounds like a program is overwriting memory that it shouldn't.
The only way I can see this is if the SD gets set back to zero and that's the descriptor the VARPG client is using. But I don't see that in my app. :)
It doesn't have to be zero, if they're the same descriptor, no matter what the number, you could have that problem. But I don't see why that'd happen, aside from memory corruption.
You aren't forgetting to call WSAStartup(), are you? Make sure you're calling WSAStartup() and WSACleanup() properly. I know there was an issue where if another thread called WSACleanup() more times than WSAStartup, it would cause all sockets in all threads to be closed. But, I thought that was only an issue in multiple threads of the same process, not when calling across two different processes. (But, maybe I'm wrong about that.)
I'm not a big fan of Windows Sockets, I always breathe a sigh of relief when I can go back to "normal" BSD sockets, like those used in Unix or i5/OS.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.