Re: Re: select() take 100% CPU with cygwin1.5.5-1 in WinXP/Win2000

2003-11-03 Thread zhouxin
I set a timeout for recvfrom() by calling select() on a UDP socket: socket()=>sendto()=>select()=>recvfrom(). It seems that it need not call bind() or connect() for UDP socket here. This method is recommended by "UNIX Network Programming Volum1 Networking APIs: Sockets and XTI(Second Edition)", W.

Re: select() take 100% CPU with cygwin1.5.5-1 in WinXP/Win2000

2003-10-31 Thread Corinna Vinschen
On Fri, Oct 31, 2003 at 01:14:17PM +0800, zhouxin wrote: > Cygwin implementation of select() take 100% CPU under multi-thread environment > sometimes. > [...] > if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0){ > fprintf(stderr, "cannot open socket for udp packet!\n"); > exit(