Re: Threaded app using sockets closes
- From: RadGar <radgar45@xxxxxxxxx>
- Date: Wed, 30 Nov 2005 11:12:01 +0100
Paul G. Tobey [eMVP] napisał(a):
1. Sounds like you should forget about breakpoints entirely and just let the application crash, if it's going to do that. You can use DEBUGMSG() or OutputDebugString() to send messages indicating the thread's progress to the Output window in eVC.
2. You should still try a sleep after the last send and before the close. Send just drops the data into the socket queue. When send() returns, that does *not* mean that the data has gone out on the wire. When you closesocket(), unless you've configured the socket for immediate close, it goes through a process to try to close the socket in a clean way, so that might take some time and I'm unsure whether closesocket() waits for that before returning or not. If you immediately try to open another socket and connect it to the same port, I can believe that there might be a problem with the emulator doing that.
Paul T.
I've managed to get what I needed (run the debug on the second loop, with unfreezing my app) - Run to cursor helped a lot. Now I'm trying to reproduce my error, but a new one occured (well at least I got exceptions in two places, but can reproduce only one of them). It's in totally new place where normally the app doesn't crash but I didn't notice it's not doing what it's expected to do (the queue stuff). I'll try to correct the error, but if not I might just drop some code here again (if I run out of ideas). thanks for your help,
RadGar .
- References:
- Threaded app using sockets closes
- From: RadGar
- Re: Threaded app using sockets closes
- From: RadGar
- Re: Threaded app using sockets closes
- From: Paul G. Tobey [eMVP]
- Re: Threaded app using sockets closes
- From: RadGar
- Re: Threaded app using sockets closes
- From: Paul G. Tobey [eMVP]
- Re: Threaded app using sockets closes
- From: RadGar
- Re: Threaded app using sockets closes
- From: Paul G. Tobey [eMVP]
- Threaded app using sockets closes
- Prev by Date: winscard.lib
- Previous by thread: Re: Threaded app using sockets closes
- Next by thread: ImageList and TreeView Control
- Index(es):
Relevant Pages
|