Re: WSAENOBUFS error with 'recv'

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Arkady Frenkel (arkadyf_at_hotmailxdotxcom)
Date: 08/24/04


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
> >>
> >
> >
>
>



Relevant Pages

  • Re: CoDisconnectObject and VB
    ... When the proxy closes, these objects are no ... "Alexander Nickolov" wrote: ... Microsoft MVP, MCSD ... Right now when this is done, the server object ...
    (microsoft.public.win32.programmer.ole)
  • Re: out-of-proc server COM
    ... Microsoft MVP, MCSD ... "Alexander Nickolov" wrote: ... write in-proc server, there are some materials about out-of-proc ... My purpose is just to learn how to write EXE server from ...
    (microsoft.public.vc.language)
  • Re: self deleting email
    ... That's one feature ... newsgroup accounts on the same server. ... I had one account setup on a different news server with a set of ... No such support in Thunderbird right now. ...
    (microsoft.public.vb.general.discussion)
  • Re: IDS Feature Request List (including potential new requests).
    ... prepared SQL statements a feature Oracle does not have! ... each hit to the database uses any available connection that exists. ... server if you have 2000 connections and 25 prepared statements then you ... Obnoxio suggested using stored procedures (in a direct email not posted ...
    (comp.databases.informix)
  • Re: agile/xp question (formal analysis)
    ... >feature, so I chatted to the guy about some of the changes, then ... >server side code on the server, then placed the doc back under doc ... >Two months later the marketing team sent a modified version of the doc ... >back with some required changes and another developer implemented them ...
    (comp.object)