Socket send blocking problem
From: Andy (anonymous_at_discussions.microsoft.com)
Date: 05/11/04
- Next message: Phil Frisbie, Jr.: "Re: Data transfer(little/big endian)"
- Previous message: vipin: "Data transfer(little/big endian)"
- Next in thread: Louis Solomon [SteelBytes]: "Re: Socket send blocking problem"
- Reply: Louis Solomon [SteelBytes]: "Re: Socket send blocking problem"
- Reply: Alan J. McFarlane: "Re: Socket send blocking problem"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 11 May 2004 11:41:05 -0700
Hi,
I've got an issue that I'm having some difficulty explaining.
I'm running a TCP socket connection across a very slow network (low bandwidth).
I am generating data faster than the transport layer can send it.
The send buffer (as defined with SO_SNDBUF) gets filled, then data essentially stops getting transmitted.
Up until the point that the send buffer is filled, data is received at a reasonably steady rate at the other end.
I'm intentionally sending a lot of small packets (nagles is disabled.. though I can see the issue either way).
It doesn't completely stop sending. It will start up again, generally with a larger packet size (even with nagles disabled) and start sending again for some short period of time. It's a bit cyclical.
The xmit side just blocks until there is data space available to put into the send call.
My question is why does the data stop getting to the other end just because my send buffer gets filled up?
It somewhat is acting like it is in a retry delay of some sort.
My second and probably more important question is there some way to peek at how much data is queued up in the kernel send buffer (size defined by SO_SNDBUF)?
Is there a way to flush it?
SO_SNDBUF set to zero won't cut it for me, as I don't want to wait for every transaction to to acked by the far end.
I also have a lot of code written already to use the blocking send. I'd rather not have to use the sockets in a non-blocking mode if I can avoid it.
Thanks in advance..
Andy
- Next message: Phil Frisbie, Jr.: "Re: Data transfer(little/big endian)"
- Previous message: vipin: "Data transfer(little/big endian)"
- Next in thread: Louis Solomon [SteelBytes]: "Re: Socket send blocking problem"
- Reply: Louis Solomon [SteelBytes]: "Re: Socket send blocking problem"
- Reply: Alan J. McFarlane: "Re: Socket send blocking problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|