Re: WSARecv & 0 length buffer

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Why ? Each time the data come IOCP envoke you worker thread so you move
data to your working buffer
from IO buffer , so you don't need a lot of them
Arkady


"qfel" <[q_tmp]@[aster.pl]> wrote in message
news:425e807f$0$1421$f69f905@xxxxxxxxxxxxxxxxxx
> The problem about socket overlapped I/O is that you need to supply
> separate buffer for each request, which is nasty when having many pending
> receives.
> For now, I issue WSARecv with 0 - length buffer (so I just want completion
> routine to be queued when any data is avalible to read). This should be
> better than event-drived model, and seems to work, although I cannot se it
> docummented anywhere.
> Does anybody know if such receives are legal?
>


.



Relevant Pages

  • Re: Overlapped IO (Sockets) and _beginethreadEx
    ... > When a receive buffer has been completely ssembled, the Worker thread ... By doing that you loose many of the advantages of the thread pool model. ... _beginthread itself isn't very fast plus whatever happens in the new thread ...
    (microsoft.public.win32.programmer.networks)
  • Re: Thread Synchronization
    ... >> OnPaint(), ... >> I could use some kind of a synchronization object on the data structure ... >> worker thread when it is time to collect it. ... >> If I use some kind of extra data structure as a buffer, ...
    (microsoft.public.vc.mfc)
  • Re: ZwWriteFile and buffer reuse
    ... DPC - if event is not signalled, DPC does not write data to the buffer, ... interrupt routine that ZwWrite routine is completed. ... a worker thread is scheduled to write the data to file. ...
    (microsoft.public.development.device.drivers)
  • Re: Synchronize the read/write operation between threads
    ... I copy the frame into a global frame buffer and return. ... In worker thread, if the global frame buffer is already written, the worker thread will copy the frame into its buffer and process it. ...
    (microsoft.public.vc.mfc)
  • Re: ZwWriteFile and buffer reuse
    ... the below code is in Worker thread which is in PASSIVE LEVEL. ... fills the buffer with data to be writen to file. ... interrupt routine that ZwWrite routine is completed. ...
    (microsoft.public.development.device.drivers)