Re: Corruption while using asynchronous callbacks on read/write socket calls.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




Hello Charles,
I would be obliged if you can have a look into this issue.

Thanks,
Henin.

henin wrote:

Hi,
Regarding our Application it's not a single threaded.It has multiple
threads but we spawn a thread for each connection and that thread
can go for synchrounous or asynchronous read/write.

The answer for your quries are as follows::
1)No we never use ZeroMemory in our code.
2)I can say this that so far we have hit this issue only when one thread
performs operations on a multiple sockets, of this synchronous on one
and asynchronous on the other.
3)Sorry according to our rules here I cannot pass on code-snippet across
to you but I can clarify all your quiries.

Can you please tell me what exactly are you looking at, then I will be
able to clear out the things we use here.

I was concerned in the sense that the callback never got any error
returned but the parameter which tells the amount of data read has
some junk data.

Thanks,
Henin.

Charles Wang[MSFT] wrote:

Hi,
My understanding of this issue is that:
When you used the WSARecv function to retrieve data you found that the transferred data bytes number showed in the callback routine completion function was much more than your limitation 2K. Your application is single thread synchronously or asynchronously sending and retrieving data on multiple sockets.
If I have misunderstood, please let me know.

For locating this issue more accurately, I would like to know:
1) Was the ZeroMemory function used to empty the overlapped structure before calling the WSARecv function?
2) Does this issue persist if your application has communications on only one socket?
3) Could you send me some code slice of your application for further research? If it's not convenient for you to publish your code, you can mail it to me (changliw@xxxxxxxxxxxxx).

Sincerely yours,
Charles Wang
Microsoft Online Community Support

====================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from this issue. ======================================================
This posting is provided "AS IS" with no warranties, and confers no rights. ======================================================





.



Relevant Pages

  • Re: Corruption while using asynchronous callbacks on read/write socket calls.
    ... Regarding our Application it's not a single threaded.It has multiple ... When you used the WSARecv function to retrieve data you found that the transferred data bytes number showed in the callback routine completion function was much more than your limitation 2K. ... Your application is single thread synchronously or asynchronously sending and retrieving data on multiple sockets. ... Microsoft Online Community Support ...
    (microsoft.public.win32.programmer.networks)
  • Re: AU - Husband named suspect in Rayney murder
    ... He should purely inject no matter how Charles when the multiple ... threads employ by no means the mental election. ...
    (sci.engr.lighting)
  • Re: OT:Some thoughts
    ... Charles A. Crayne wrote: ... >:on large projects (multiple people) it's important to break ... Prev by Date: ...
    (alt.lang.asm)
  • Re: What are you reading?
    ... Suggest you read the entire thread, Charles. ... I've stated on multiple ... occasions that everyone enjoys a little junk food for the soul. ...
    (alt.smokers.cigars)