thousands of request in one port per second

K

Kenny McCormack

of specious claims and other junk. I don't have time to hack it all to
bits at the moment, but he leads up to:
....
You, on the other hand, rarely contribute anything here but abuse.
You're such a big fan of answering questions, why do you so rarely
answer questions?

Because if he did, he'd get the same kind of unabashed abuse that you
give Mr. Twink.

Newbies note: It is simply not possible to give real help in CLC, without
getting abused by the regs for your efforts.
 
A

Antoninus Twink

Presumably because he doesn't know the answers. Envying those who do,
he seeks to denigrate them at every opportunity. [snip]
It's called "hypocrisy".

Once again, the needle on the irony-meter is spinning wildly out of
control.

Heathfield decries others for denigrating people who know more about C
than they do (maybe even enough to write a C compiler?...), then accuses
others of hypocrisy. Simply priceless.
 
K

Kenny McCormack

Presumably because he doesn't know the answers. Envying those who do,
he seeks to denigrate them at every opportunity. [snip]
It's called "hypocrisy".

Once again, the needle on the irony-meter is spinning wildly out of
control.

Heathfield decries others for denigrating people who know more about C
than they do (maybe even enough to write a C compiler?...), then accuses
others of hypocrisy. Simply priceless.

It boggles the mind, but it does make for good entertainment.
 
C

CBFalconer

Praki said:
.... snip ...

I chose this group because my implementation going to be in c and
also most of the language which intern uses C to work regarding
the socket programing. So i want to develop my application in C
language and Linux Platform.I cannot change the Protocol because
it UDP based SNMP Protocol.i have respone like a device in SNMP
protocol so i cannot change the protocol. If i act like a thousand
device there many be thousand request to the server at a time.if
i ack like a 2000 device there will be 2000 request at a time. so
i want to handle all the request in UDP protocol. if the server
takes long time then client will go off saying time out. this is
my problem.

However the C language is defined by the C standard (C99 markers
below), not by what additions and systems have been installed on
specific systems. In particular the internetworking protocals are
totally independant of C, and vice-versa. If you want help with
them pick a newsgroup that discusses them, or a newsgroup that
discusses your particular system.

Some useful references about C:
<http://www.ungerhu.com/jxh/clc.welcome.txt>
<http://c-faq.com/> (C-faq)
<http://benpfaff.org/writings/clc/off-topic.html>
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf> (C99)
<http://cbfalconer.home.att.net/download/n869_txt.bz2> (pre-C99)
<http://www.dinkumware.com/c99.aspx> (C-library}
<http://gcc.gnu.org/onlinedocs/> (GNU docs)
<http://clc-wiki.net/wiki/C_community:comp.lang.c:Introduction>
 
A

Antoninus Twink

In particular the internetworking protocals are totally independant of
C, and vice-versa.

Of course, this is nonsense.

The internet is built on C, and the fundamental networking or socket
structures that we take completely for granted today are tightly
interwoven with the C language.
 
J

James Harris

I chose this group because my implementation going to be in c and also
most of the language which intern uses C to work regarding the socket
programing. So i want to develop my application in C language and
Linux Platform.I cannot change the Protocol because it UDP based SNMP
Protocol.i have respone like a device in SNMP protocol so i cannot
change the protocol. If i act like a thousand device there many be
thousand request to the server at a time.if i ack like a 2000 device
there will be 2000 request at a time. so i want to handle all the
request in UDP protocol. if the server takes long time then client
will go off saying time out. this is my problem.

So you want one server (on one IP address) to act like 2000 servers?
There are different ways to do this. In no particular order:

1) Start 2000 server processes which listen on 2000 UDP ports.
2) Have the master process or thread listen on a given port and
dispatch worker threads or processes to deal with requests as they
come in.
3) Have a single-threaded process handle all work in a loop using the
"select" function. Check the man page for select.

If you need to do I/O to satisfy requests use option 1 or option 2 to
prevent incoming work requests from being lost.

If the server work is CPU only then option 3 may be fastest.

If you haven't already done so check man pages for socket, recv,
recvfrom, bind, send, sendto etc.
 
N

Nick Keighley

On 10 Oct 2008 at 21:53, CBFalconer wrote:

Of course, this is nonsense.

The internet is built on C, and the fundamental networking or socket
structures that we take completely for granted today are tightly
interwoven with the C language.

TCP/IP is defined independently of the C langauge. You could
write TCP/IP software in FORTRAN (if you were feeling masochistic).
Sockets tend to be programmed in C but plenty of other
languages support sockets.
 
C

Chad

of specious claims and other junk. I don't have time to hack it all to
bits at the moment, but he leads up to:
...


Because if he did, he'd get the same kind of unabashed abuse that you
give Mr. Twink.

Newbies note: It is simply not possible to give real help in CLC, without
getting abused by the regs for your efforts.

I've never really gotten abused. I think the rules are pretty simple.

1)Post the C question in the C forum.

2)Make every effort clearly state your problem.
 
C

CBFalconer

Nick said:
TCP/IP is defined independently of the C langauge. You could
write TCP/IP software in FORTRAN (if you were feeling
masochistic). Sockets tend to be programmed in C but plenty of
other languages support sockets.

Nothing wrong with your post. I just want to suggest that when you
have to make such a post pointing out the faulty information
presented by Twink, you also mention his troll behaviour. This may
help avoid Twink getting some newbies confused.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top