Re: CLOSE_WAIT

2002-09-02 Thread Guy Cohen
ation suite that will leave > sockets in CLOSE_WAIT state... socket() bind() listen() while(1) accept() fork() with no close () with no close() telnet to your port, press '^]' and you'll have CLOSE_WAIT untill you ^C your server. > > =

Re: CLOSE_WAIT

2002-09-02 Thread Shachar Shemesh
ut not "close", you should get the same behaviour with "CLOSED" instead of "CLOSE_WAIT". Shachar Michael Sternberg wrote: >On 02 Sep 2002 11:07:55 +0300 >Gilad Ben-Yossef <[EMAIL PROTECTED]> wrote: > > > >>I saw this once and

Re: CLOSE_WAIT

2002-09-02 Thread Michael Sternberg
fault - failed to close socket somewhere. Although I don't think so.. I still did not got answer from anybody on how to create this situation. I mean how to write a faulty client/server application suite that will leave sockets in CLOSE_WAIT state... ===

Re: CLOSE_WAIT

2002-09-02 Thread Gilad Ben-Yossef
> > Everybody on the Net keeps telling me that they are nessessary. I have a > client/server utility, both sides are at my control. It works for some > two-three weeks and then computer flooded with CLOSE_WAITS, I can not open > more sockets and have to restart application (or reboot computer).

Re: CLOSE_WAIT

2002-09-02 Thread LS
n connections, you should handle this in your code. What I was saying earlier was that for example, read() returns 0 when a FIN is received (i.e: moving to the CLOSE_WAIT state). What you should basically try to do is to find out where in your code read() receives 0. If you have a wrapper function

Re: CLOSE_WAIT

2002-09-02 Thread Shachar Shemesh
I think you missed my later email stating that my first one was a mistake. I confused "CLOSE_WAIT" and "TIME_WAIT". The later is unavoidable, the former is. When you ask an application to shut down a socket, it sends a FIN out, and enters "FIN_WAIT1". Whe

Re: CLOSE_WAIT

2002-09-01 Thread Michael Sternberg
to work 24/7/365. How do they handle this problem ? > >>3. Why can't I release them from outside with some utility ? > >> > You can try a packet generator to send a RST to the connection. I doubt > that is worth it, though. Can you be more detailed ? You mean, I

Re: CLOSE_WAIT

2002-09-01 Thread Shachar Shemesh
he next questions: >>> >>> 1. How can I reproduce situation that my code will leave >>> sockets in CLOSE_WAIT state ? >>> > Close_wait happens when you closed the connection before the other > side did, or you both closed it together (not as rare as it may

Re: CLOSE_WAIT

2002-09-01 Thread Shachar Shemesh
he Google and did not find anything that >>will fully answer me to the next questions: >> >>1. How can I reproduce situation that my code will leave >> sockets in CLOSE_WAIT state ? >> Close_wait happens when you closed the connection before the other side did, or you bot

Re: CLOSE_WAIT

2002-09-01 Thread Oded Arbel
can I reproduce situation that my code will leave >> sockets in CLOSE_WAIT state ? >> >>2. What measures can I take to prevent them to appear ? >> >>3. Why can't I release them from outside with some utility ? >> Because sockets are actually file descr

Re: CLOSE_WAIT

2002-09-01 Thread Lord Soth
t my code will leave > sockets in CLOSE_WAIT state ? > > 2. What measures can I take to prevent them to appear ? > > 3. Why can't I release them from outside with some utility ? > > 4. (Optional question) I got the feeling that situation in M$ world >with sockets hanging arou

CLOSE_WAIT

2002-09-01 Thread Michael Sternberg
Sorry if I'm starting a long thread with this letter :) I digged through the Google and did not find anything that will fully answer me to the next questions: 1. How can I reproduce situation that my code will leave sockets in CLOSE_WAIT state ? 2. What measures can I take to prevent