由买买提看人间百态

topics

全部话题 - 话题: socketno
(共0页)
p********p
发帖数: 5
1
来自主题: Unix版 - Socket programming help
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
(共0页)