Re: How to deal with full-duplex communication?
- From: "Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp>
- Date: Thu, 25 May 2006 08:35:49 -0400
fadics wrote:
I use CAsyncSocket class.
When A receives a packet, it sends a return receipt to B. B does the same.
When A and B send a packet at the same time, they receive the receipt of
previous packet. So they wait the last receipt at the same time. The
communication breaks. How to solve this problem.
Thank you for any answer. A sample is welcome more.
Your protocol logic must be prepared to process whatever it receives. It cannot assume that the next message must be a return receipt. If your return receipts contain a serial number of the message being acknowledged then you can maintain a list of pending receipts. (It is possible you will receive several messages before receiving a receipt.)
--
Scott McPhillips [VC++ MVP]
.
- Prev by Date: Re: Button error
- Next by Date: Re: Multithreading Component
- Previous by thread: Disable items in a CListCtrl in icon view
- Next by thread: Re: How to deal with full-duplex communication?
- Index(es):