Re: WSAENOBUFS error with 'recv'
From: Arkady Frenkel (arkadyf_at_hotmailxdotxcom)
Date: 08/24/04
- Next message: Arkady Frenkel: "Re: WSAENOBUFS error with 'recv'"
- Previous message: mil: "Re: Socket switch delay"
- In reply to: Alexander Nickolov: "Re: WSAENOBUFS error with 'recv'"
- Next in thread: Alexander Nickolov: "Re: WSAENOBUFS error with 'recv'"
- Reply: Alexander Nickolov: "Re: WSAENOBUFS error with 'recv'"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 25 Aug 2004 00:26:52 +0200
Are you sure about W2K ? That really like this in XP and the feature not
described , but in Server 2003 . I posted before some time message about
that with question if someone see that define for XP but alas ... no answer.
BTW I see that if I talk e.g. with MS servers ( www.microsoft.com ) the
incoming size is 16K always , on my XP that floating around 60K for wireless
and ethernet too
Arkady
"Alexander Nickolov" <agnickolov@mvps.org> wrote in message
news:uWhJx0fiEHA.2848@TK2MSFTNGP10.phx.gbl...
> Actually, by observing the network traffic, the advertized TCP
> receive window on Win 2K/XP is 64K...
>
> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD
> email: agnickolov@mvps.org
> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================
>
> "Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
> news:cgfo62$eb9$1@home.itg.ti.com...
> > Correct for NT from W2K that 16K but any case try to increase the size
by
> > setsockopt() with SO_RCVBUF/SO_SNDBUF.
> > Arkady
> >
> > "Peter Johansson" <Peter.Johansson.n.o@s.p.a.m.contactor.se> wrote in
> > message news:ZKIWc.44$Q%1.93120@uab.ericsson.se...
> >> Innokentiy Ivanov wrote:
> >>
> >> > Hello, Mr. Peter Johansson!
> >> > You wrote on Tue, 24 Aug 2004 16:04:33 +0200:
> >> >
> >> > Thank you for your response.
> >> >
> >> > PJ> I also had this problem until I found the MSDN page "Error
Codes -
> >> > PJ> errno, h_errno and WSAGetLastError". It says "It may be the case
> >> > in
> >> > PJ> some implementations that other Windows Sockets error codes are
> >> > PJ> returned in addition to those listed, and applications should be
> >> > PJ> prepared to handle errors other than those enumerated under each
> >> > PJ> function description.".
> >> >
> >> > The Golden Words :). Surely, application must be prepared to handle
the
> >> > unexpected behaviour of any (not only socket-oriented) external
> > function -
> >> > that is the basis for stability and safety.
> >> >
> >> > PJ> Your problem (I would assume) is probably that you are trying to
> >> > PJ> receive a huge amount of data in a single call to recv.
> >> >
> >> > The application which produces this error operates with small data
> > chunks.
> >> > The maximal desired size passed to 'recv' call does not exceed 32K.
> >> >
> >> >
> >> > Sincerely yours,
> >> > Innokentiy Ivanov
> >> > EldoS Corp.
> >> >
> >>
> >> Still, whenever any of the socket functions returns ENOBUFS, you have a
> >> resource problem (this is quite a common problem). An easy way to
handle
> >> this is to have a variable recv size (decrease for as long as ENOBUFS
is
> >> received) and increase again later. If this decreases throuput too
much,
> >> then I would consider changing the recv socket buffer size. The default
> >> size is 8KB.
> >>
> >> / Regards, Peter
> >>
> >
> >
>
>
- Next message: Arkady Frenkel: "Re: WSAENOBUFS error with 'recv'"
- Previous message: mil: "Re: Socket switch delay"
- In reply to: Alexander Nickolov: "Re: WSAENOBUFS error with 'recv'"
- Next in thread: Alexander Nickolov: "Re: WSAENOBUFS error with 'recv'"
- Reply: Alexander Nickolov: "Re: WSAENOBUFS error with 'recv'"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|