Re: IOCP with sockets



Hi Steve,
From your description, I understand that:
You found that you could not get any data on the other machine. You used
WSARecv() twice to receive the data. You set the receive length same as the
actual buffer size.
If I have misunderstood, please let me know.

This is a quick note to let you know that I will perform further research
on this issue tommorrow.
For now, you may refer to the similar posts at the newsgroup which may give
you some hints:
IOCP with multiple WSARecv()
http://groups.google.com/group/alt.winsock.programming/browse_frm/thread/a88
c3f628ec019f4/d5d3f54c335e6dea?lnk=st&q=IOCP+WSARecv&rnum=2#d5d3f54c335e6dea

about "how to use WSARecv() in IOCP model?"
http://groups.google.com/group/microsoft.public.win32.programmer.networks/br
owse_frm/thread/5a50d2d1803388a8/651df68f56efce83?lnk=st&q=IOCP+WSARecv&rnum
=1#651df68f56efce83

I/O completion port problem
http://groups.google.com/group/microsoft.public.win32.programmer.networks/br
owse_frm/thread/8202861d7e68f552/233dba54cf1ca1f2?lnk=st&q=IOCP+WSARecv+%22n
o+data%22&rnum=8#233dba54cf1ca1f2

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: Problem with Socket Server using IOCP getting 0 bytes under heavy
    ... > SOCKET SERVER IMPLEMENTATION ... > the WSARecv then hands things off to the underlying IOCP - which is ... > GetQueuedCompletionStatus when under heavy load. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Problem with Socket Server using IOCP getting 0 bytes under he
    ... Thread is doing the first WSARecv with a buffer size of 1024 - I believe this ... the socket, the handle is given to IOCP - where we then get all remaining ... "Arkady Frenkel" wrote: ... > IOCP is only synchronization object - read/write you always do by IO ...
    (microsoft.public.win32.programmer.networks)
  • Re: IOCP and I/O completion order
    ... The important thing, in fact, about WSARecv is not the completion order. ... "The order in which I/O completion packets are queued in the IOCP is not ... there is no guarantee on the order for receipt of the ... for the second send before the completion notification for the first. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Problem with Socket Server using IOCP getting 0 bytes under he
    ... IMHO that's OK you can issue WSARecv on that thread first time ... and on working thread due to IOCP ... Arkady ...
    (microsoft.public.win32.programmer.networks)
  • Re: IOCP Socket communcation
    ... The SDK sample for IOCP uses WSASend() and ... WSARecv(), not plain-old sendand recv. ...
    (microsoft.public.win32.programmer.kernel)