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.
>
> =
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
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...
===
>
> 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).
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
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
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
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
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
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
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
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
12 matches
Mail list logo