Re: help with socket programming[OFF TOPIC]

1999-07-30 Thread David Wright
Quoting Shao Zhang ([EMAIL PROTECTED]): > > while (1) { > if ((NewHandle = accept(CGIHandle, (struct sockaddr > *)&CGI_addr, \ > &sin_size)) == -1) { > perror("cannot accept"); > continue; > } > >

help with socket programming[OFF TOPIC]

1999-07-28 Thread Shao Zhang
Hi, Sorry about the none debian specific question. I am writing a server which will handle all the cgi request coming from our website. My server function looks like this: while (1) { if ((NewHandle = accept(CGIHandle, (struct sockaddr *)&C

help with socket programming

1999-07-06 Thread Shao Zhang
Hi, How do I do timeout in socket programming? For example, if the client has got no answer in 90 seconds, it will print a message "still waiting". How do I do this? I have tried to use select & FD_ISSET, but it is a blocking call, so I had to use fork with it, then when