|
Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006
CS programming udp S at the end of it the same way or as tcp :
[code]
Main ()
{
Fd = socket (and [color=red]SOCK_DGRAM[/color],);
While (1) (
Upd client端 receiving messages;
If (not received) (
Continue;
}
*/ Before anything else -- LEAVES OF 13 SPECIES OF LAURACEAE
Pid = fork ();
Switch (pid) (
Case -1 :
Err;
Break;
Case 0 :
Business;
Message sent udp client端 results;
Exit (0);
Break;
Default :
Continue;
Break;
LEAVES OF 13 SPECIES OF LAURACEAE switch*/)
/*else*/)
LEAVES OF 13 SPECIES OF LAURACEAE while*/)
Exit (0);
}
[/code]
Right above the rational structure. Any better options. Never played udp, white, to consult, to thank a first! Em09 : : |
CS programming udp I can see this, I conducted a small procedure, but to no avail son process. Is a question one answer. |
CS programming udp At that time, more than 100 clients, may, with a fork.
Ah Q views to the views of all 67,000 |
CS programming udp Oh, this switch (pid) of the very good ah
Yet to see in other places, too : look at the procedures - ( |
CS programming udp -->
Thank you!
But I was not creative, long ago on the Internet to see, it is estimated that the good years had been circulated in the hands of the programmers. First thought must be a silver cow!
Aesthetic you can do to show that you are very gifted, will be used so!
Also, everyone on the service side of the structure upd, make a suggestion! Em16 : : |
CS programming udp Fork bad way. If udp so many requests, the system is easy because the process of creating excessive consumption of more resources resulting system was extremely inefficient.
In addition, the process of creating restrictions on the total number os, udp excess, will not function properly.
Consider using the two-way communication process through the formation, the process of receiving udp placed in the main queue, the queue of another process to handle requests. |
CS programming udp Plus select, fork; not afraid synchronization problems, coupled with thread control, the main thread resumption received some data, by processing threads. |
CS programming udp -->
Queue system is provided by the brothers refers to the message queue, or to realize their own procedures to safeguard the data structure?
If using cohort, assuming receiving A, B, I think there are two preliminary consideration
1. To deal with, whereas the corresponding data to be able to return to the client, should udp A reception Handle, sending the SA structure, as well as the udp包 band together into the queue B;B distributed processing is completed, we want to receive Handle, sending the SA structure and the results of data binding, A gift back. A reply to that in order to correct this udp Client
2. If AB using the Message Queue System, the system message queue information on the number of general restrictions, usually 50%. My situation will be far greater than this. Well, I think
A) adjusting the number of restrictions, but younger blunt, I do not know how engaging
B) AB-process communication with the local socket. Is soekct (PF_UNIX,,), I would like to use udp way, but I do not know that there would be a process of communication stuff etc. udp. Parameters PF_UNIX not played since, so it is some Nabuwen.
Please everyone continue to guide me! |
CS programming udp
| CS programming udp Up |
CS programming udp -->
UNPv1 server design is the final chapter, there are three ways in which thread. But that is a TCP, the same should be used? : D |
CS programming udp I watched in school, the landlord really clear idea! |
| |