By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,414 Members | 1,050 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,414 IT Pros & Developers. It's quick & easy.

Problem with socket programming

P: n/a
Recently I got a problem with LINUX C socket programming.
I want to get how many clients are waiting for being accepted in the
socket server pending queue .
I'm trying to find the answer from the books and internet and found a
kernel function : sockfd_lookup (it's similar what I want ).
But I have no idea about this function .
I don't know how to call this function because it's a kernel function .
Is there any other way to get the number of the socket server pending
queue ?

Thanks for your reading .

Jun 12 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 11 Jun 2006 19:10:54 -0700, "Carl" <ca*******@gmail.com> wrote in
comp.lang.c:
Recently I got a problem with LINUX C socket programming.
Then you need to ask about it in a Linux group, like
news:comp.os.linux.development.apps.
I want to get how many clients are waiting for being accepted in the
socket server pending queue .
The C language and its standard library do not provide or support any
networking functions.
I'm trying to find the answer from the books and internet and found a
kernel function : sockfd_lookup (it's similar what I want ).
This is not a C function, it is a system-specific question extension
provided by your OS and compiler.
But I have no idea about this function .
Neither do we. It is part of Linux, not part of C.
I don't know how to call this function because it's a kernel function .
Is there any other way to get the number of the socket server pending
queue ?


The people in the group I recommended above can probably answer that.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jun 12 '06 #2

P: n/a
Thanks for your reply and I will post this to the correct group.

Thanks :)
Jack Klein 寫道:
On 11 Jun 2006 19:10:54 -0700, "Carl" <ca*******@gmail.com> wrote in
comp.lang.c:
Recently I got a problem with LINUX C socket programming.


Then you need to ask about it in a Linux group, like
news:comp.os.linux.development.apps.
I want to get how many clients are waiting for being accepted in the
socket server pending queue .


The C language and its standard library do not provide or support any
networking functions.
I'm trying to find the answer from the books and internet and found a
kernel function : sockfd_lookup (it's similar what I want ).


This is not a C function, it is a system-specific question extension
provided by your OS and compiler.
But I have no idea about this function .


Neither do we. It is part of Linux, not part of C.
I don't know how to call this function because it's a kernel function .
Is there any other way to get the number of the socket server pending
queue ?


The people in the group I recommended above can probably answer that.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html


Jun 12 '06 #3

P: n/a
"Carl" <ca*******@gmail.com> writes:
Recently I got a problem with LINUX C socket programming.
I want to get how many clients are waiting for being accepted in the
socket server pending queue .


Even if you could find out, it's hard to tell what you could do
with this information. The number of clients waiting to be
accepted can change (increase or decrease) at any time. You
wouldn't be able to check and act on the information as an atomic
action.

Oops--I just noticed that this is comp.lang.c. This newsgroup is
not a good place to ask this question. If you really want to ask
about Linux specifically, then you should ask in a Linux
newsgroup; otherwise, comp.unix.programming is a good place for
Unix-related questions.
--
char a[]="\n .CJacehknorstu";int putchar(int);int main(void){unsigned long b[]
={0x67dffdff,0x9aa9aa6a,0xa77ffda9,0x7da6aa6a,0xa6 7f6aaa,0xaa9aa9f6,0x11f6},*p
=b,i=24;for(;p+=!*p;*p/=4)switch(0[p]&3)case 0:{return 0;for(p--;i--;i--)case+
2:{i++;if(i)break;else default:continue;if(0)case 1:putchar(a[i&15]);break;}}}
Jun 12 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.