Re: Losing UDP packets with MFC Sockets



Vicent Soler wrote:
Just two questions:

1.- The buffer size allows to store temporarly more than 1 packet? Or it is related to the maximum packet size?

2.- About the thread: should I use threads for extracting data from input buffer after OnReceive notification?

Thanks in advance

Vicent

You will need to experiment and see if the buffer size makes any difference. My guess is that it will not help.


The CAsyncSocket object works in only one thread. Put all of its code in a thread that you derive from CWinThread. Raise the thread's priority. Call ReceiveFrom immediately in OnReceive.

--
Scott McPhillips [VC++ MVP]

.



Relevant Pages

  • [PATCH 2.6.17-rc5-mm2 15/18] sbp2: fix S800 transfers if phys_dma is off
    ... If sbp2 is forced to move data via ARM handler, the maximum packet size ... allowed for S800 transfers exceeds ohci1394's buffer size on platforms ... that we (the driver and host) only ...
    (Linux-Kernel)
  • how much size is enough ?
    ... what is the buffer size I should be using. ... If I am assume a maximum network length of 200 meters node to node. ... If I assume my minimum rx packet length of 64 bytes and maximum packet ...
    (comp.dcom.lans.ethernet)

Loading