closing ASyncSocket
- From: "Bill Brehm" <<don't want any spam>>
- Date: Wed, 8 Mar 2006 18:52:48 +0800
I had asked part of this in another thread but i have more related questions
so I repeat one part.
1. When is it safe after sending to call Close()? I have it implemented now
where I close from within the OnSend() call when I have no further data to
send. I thought that means the data is safely underway. But it seems that
sometimes the data is received on the other side and sometimes it isn't. I'm
not sure if the connection being closed before the other side reads the data
out is the cause of the problem or if I maybe have another problem.
2. Then because of that problem, I decided to try Close()ing on the
receiving side (Server) after I received the last data. This was an
improvement because the data was always received. But it seems the sending
side (Client) doesn't realize the connection is closed. It does get the
OnClose() call. But when I try to initiate another transaction by having the
client connect to the server, it gets an error that it is already connected
(10056). Do I need to call Close() from within the OnClose() call triggered
by the other side?
I'm sure i'll have more later. Thanks...
.
- Follow-Ups:
- Re: closing ASyncSocket
- From: Joseph M . Newcomer
- Re: closing ASyncSocket
- Prev by Date: Painter for CMyDocView does not inherit from CView - How to?
- Next by Date: I want to set a variable for 30 days
- Previous by thread: Painter for CMyDocView does not inherit from CView - How to?
- Next by thread: Re: closing ASyncSocket
- Index(es):
Relevant Pages
|