From: Gary Wright Date: 2007-12-16T00:47:50+09:00 Subject: Re: Question about sockets/listeners On Dec 15, 2007, at 9:38 AM, James Croft wrote: > A simplified > version of what i have done so far is shown below, however, when I run > this, the client stops sending packets after the 66th one. Can > someone > explain this to me please? why is it stopping at 66? which limit > am i > hitting? > My first guess is that you are running out of file descriptors. It looks like each thread creates a new socket, calls send, then calls recvfrom repeatedly, never closing the socket and freeing the file descriptor. You should close the socket after receiving a response. Alternatively you could see how to raise the per/process file descriptor limit for your system (for bash, try looking at the ulimit command--the exact command and syntax depends on the shell you are using). Gary Wright