Ask a Question related to UNIX Programming, Design and Development.
-
Terry Sanders #1
Socket SO_RCVBUF information.
Hi,
For various reasons I need to how many packets are queued in the SO_RCVBUF
of a udp socket. I know there are various mechanisms for detecting if there
is one
or more packets queued, but I cant find anything to tell me exactly how many
are queued.
Does anybody have any idea how to get this information. I currently need
this for linux.
Any ideas would be appreciated.
Regards
Terry
PS. Replace "nobody" in the email address with "trs" to email me.
Terry Sanders Guest
-
xml socket
Hi, I would like to use xml socket in order to make a connection between flash clients but I don't know which would be the best Socket server for... -
IO::Socket::SSL
Hi, Is it also possible to lookup the fingerprints of a peer certificate? Thanks in advanced, Frank de Bot -
Socket.accept problem via Socket.for_fd($stdin.fileno)
Hi, I am experiencing a rather infuriating problem with Socket.accept on Windows XP. The problem exists when I try to create a Socket from... -
Socket
Hi, I would like to know if it is possible to transfer files from one computer to another using socket and Perl(obviously). And which module... -
Distinguishing between socket buffer full & socket disconnected
I am using the IO::Select method can_write() to flow control the writing of a large amount of data to a socket, where the writer may well run ahead... -
David Schwartz #2
Re: Socket SO_RCVBUF information.
"Terry Sanders" <nobody@vertone.co.uk> wrote in message
news:UmrXa.13665$SQ1.10546@news-binary.blueyonder.co.uk...
there> For various reasons I need to how many packets are queued in the SO_RCVBUF
> of a udp socket. I know there are various mechanisms for detecting ifmany> is one
> or more packets queued, but I cant find anything to tell me exactly howI don't think anybody will be able to answer your question without> are queued.
> Does anybody have any idea how to get this information. I currently need
> this for linux.
understanding your actual problem. Just hearing your proposed solution is
insufficient for us to formulate a solution that will work.
DS
David Schwartz Guest
-
Terry Sanders #3
Re: Socket SO_RCVBUF information.
"Barry Margolin" <barry.margolin@level3.com> wrote in message
news:KOuXa.8$GI6.5@news.level3.com...SO_RCVBUF> In article <UmrXa.13665$SQ1.10546@news-binary.blueyonder.co.uk>,
> Terry Sanders <nobody@vertone.co.uk> wrote:> >For various reasons I need to how many packets are queued in thethere> >of a udp socket. I know there are various mechanisms for detecting ifmany> >is one
> >or more packets queued, but I cant find anything to tell me exactly howguaranteed>> >are queued.
> >Does anybody have any idea how to get this information. I currently need
> >this for linux.
> You could try using the FIONREAD ioctl, but I don't know if it'sDoesn't FIONREAD return the number of bytes in the next udp packet> to work or portable. However, if it works it will tell you how many bytes
> are in the queue, not how many packets.
>
> Why do you need to know this, anyway? If another packet arrives after the
> call returns, the information will be wrong.
>
(+ addr len) as opposed to the number of bytes in the RCVBUF?
What I'm doing is developing an application to test the capabilities
of another. At any one time it has to decide whether to send the next
packet, read a packet, act on a packet already read (which may involve
sending another packet), process timeouts on previous packets sent or
any one of a number of other things. By knowing how many packets are in
the read queue the application can make decisions on whether in can
safely ignore the contents of the read queue, until the next pass, in
favour of processing other parts which may be running behind.
Terry Sanders
Terry Sanders Guest
-
Rick Jones #4
Re: Socket SO_RCVBUF information.
In comp.protocols.tcp-ip Terry Sanders <nobody@vertone.co.uk> wrote:
On HP-UX at least the manpage for ioctl(5) states:> Doesn't FIONREAD return the number of bytes in the next udp packet
> (+ addr len) as opposed to the number of bytes in the RCVBUF?
FIONREAD
Returns in the long integer whose address is arg the
number of characters immediately readable from the
device file.
Sounds like knowing how full the socket buffer with FIONREAD would be> What I'm doing is developing an application to test the capabilities
> of another. At any one time it has to decide whether to send the next
> packet, read a packet, act on a packet already read (which may involve
> sending another packet), process timeouts on previous packets sent or
> any one of a number of other things. By knowing how many packets are in
> the read queue the application can make decisions on whether in can
> safely ignore the contents of the read queue, until the next pass, in
> favour of processing other parts which may be running behind.
sufficient - assuming you know in advance the typical datagram sizes
so you know whether or not you are within N datagrams of overflowing
the socket buffer.
rick jones
--
a wide gulf separates "what if" from "if only"
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to raj in cup.hp.com but NOT BOTH...
Rick Jones Guest
-
Terry Sanders #5
Re: Socket SO_RCVBUF information.
"Rick Jones" <foo@bar.baz.invalid> wrote in message
news:XuSXa.1469$8%2.658@news.cpqcorp.net...You're right about this. I can use this with a high/low mark to> In comp.protocols.tcp-ip Terry Sanders <nobody@vertone.co.uk> wrote:>> > Doesn't FIONREAD return the number of bytes in the next udp packet
> > (+ addr len) as opposed to the number of bytes in the RCVBUF?
> On HP-UX at least the manpage for ioctl(5) states:
>
> FIONREAD
> Returns in the long integer whose address is arg the
> number of characters immediately readable from the
> device file.
>
decide on priorities.
Cheers
Terry Sanders
Terry Sanders Guest
-
Unregistered #6Unregistered Guest



Reply With Quote


