Thread: TIME_WAIT problem

  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    61

    Exclamation TIME_WAIT problem

    Hi,

    I'm using sockets for communication. Everything works fine but when i use netstat on server,
    There are many connections with "TIME_WAIT" state and are increasing! I shutdown and close the sockets on both client and server, so what's wrong?
    Client is windows and server is linux.
    Any idea?

    Thanks b4

  2. #2
    Registered User
    Join Date
    Jul 2009
    Posts
    61
    long time and no answer! Is this forum alive?!!!

  3. #3

  4. #4
    Registered User
    Join Date
    Mar 2010
    Posts
    68
    you also posted the least amount of information, so no one will try to help if you post something like: I have a problem with windows, it crashes when I run Microsoft word, help me!


    yeah... Ok.. Will do

  5. #5
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by smasherprog View Post
    you also posted the least amount of information, so no one will try to help if you post something like: I have a problem with windows, it crashes when I run Microsoft word, help me!
    I'm not exactly sure I know what you mean by that, but you seem unhappy with his response.
    He, in fact, posted exactly the information you needed. The information the link points to, and even the text of the link!
    He could have just said JFGI, try being a little more grateful...

  6. #6
    Registered User
    Join Date
    Mar 2010
    Posts
    68
    I should have been more clear:I was responding to hosseinyounesi because he gave the smallest about of information. It tires me when people ask for help and give so little information it makes the helping part difficult.

    Thats all!

  7. #7
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by hosseinyounesi View Post
    There are many connections with "TIME_WAIT" state and are increasing! I shutdown and close the sockets on both client and server, so what's wrong?
    Nothing.

    Sometimes, after I turn off my car, the radiator fan continues spinning for a few minutes. Nothing wrong with that either. It's the way it's meant to work.

    (The reason is actually not very interesting. When you close a socket, it is possible that not all data has been completely transmitted or received at the other end yet. Remember that the network is not perfect and packets can be lost. To ensure that the last few pieces of data really get there, the socket hangs around in the OS for a little while to finish up any remaining loose ends)
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  8. #8
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by smasherprog View Post
    I should have been more clear:I was responding to hosseinyounesi because he gave the smallest about of information. It tires me when people ask for help and give so little information it makes the helping part difficult.

    Thats all!
    Ahh. I see, sorry about that.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM

Tags for this Thread