[gameprogrammer] Re: TCP output buffer size

i think he is talking about an internal TCP stack buffer that actually holds
the data before it gets sent on the line.

I would expect that not to be something you'd have to query for, that
somehow it would just work, like maybe blocking your async call when it was
full or returning an error code but i'm not certain.

Also it sounds like something that may be OS specific if it is something you
have to query for (but i really doubt that you do).

I seriously bet the send function would just return a descriptive error if
it was full, at which point you could try again a few frames later or
something, keep trying til it goes through.



On Sat, Mar 7, 2009 at 6:41 PM, milos chmel <xchmelmilos@xxxxxxxxx> wrote:

> I quite don't understand what You're talking about. How can You run
> out of system memory by doing that ;). Maybe You have some leaks (use
> valgrind or something like that ).
> send file trough TCP
> You wan't to do that in C / C++ ? Just use send() with some fixed size
> preallocated buffer. You will need to include std library's socket.h .
> This should be in std library. For further info RTM or STW ;)
>
> 2009/3/8 Kevin Jenkins <gameprogrammer@xxxxxxxxxx>:
> > I want to send a very large file by TCP. If I send the whole file at once
> it
> > would cause the system memory to run out. So I want to check the internal
> > TCP stack size remaining, and send more of the file when it is empty or
> near
> > empty.
> >
> > How do I do that?
> >
> > ---------------------
> > To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> >
> >
> >
>
>
>
> --
> "Brevity is the soul of wit." by William Shakespeare
> " It IS NOT all FACTS. It IS TRUE. I believe it SHOULD NOT BE BELIEVE
> LITERALLY. It IS TRUE."  - jorgipogi
>
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>
>
>

Other related posts: