Socket programming help# Unix - 噫吁兮,危乎高哉
p*p
1 楼
My program (running on Solaris) will run into the poblems during the
high traffic time period. The piece of code looks like :
listen(socketdescriptor, 800);
for (;;) {
int socketno;
struct sockaddr_in clientaddress;
int addresssize= sizeof(clientaddress);
if ((socketno=accept(socketdescriptor, (struct sockaddr *)
&clientaddress,
&addresssize))<0) {printout error mesage;}
else {
put the "socketno" into a request queue, and other seperate
processing threads will
high traffic time period. The piece of code looks like :
listen(socketdescriptor, 800);
for (;;) {
int socketno;
struct sockaddr_in clientaddress;
int addresssize= sizeof(clientaddress);
if ((socketno=accept(socketdescriptor, (struct sockaddr *)
&clientaddress,
&addresssize))<0) {printout error mesage;}
else {
put the "socketno" into a request queue, and other seperate
processing threads will