in reply to Win32 sockets and disconnects

I don't see anything wrong with the code above. From your description it sounds like it may be the client. A way to test this would be to have a second client connect to your server from another pc after you do a ctrl-c on the first client. If the second client can't connect then it is a problem with the server. If it can connect then it is a problem with the client. Let me know what happens.

Replies are listed 'Best First'.
Re: Re: Win32 sockets and disconnects
by HaB (Sexton) on Dec 13, 2000 at 19:38 UTC
    Interesting...

    We tried what you said, with some definately odd results:

    Started server, started client A.
    Ctrl-C'd client A and restarted it.
    Got the same result we had been getting. It says it connects, sends a message, and sits waiting for an ACK.

    Then, we started client B on another machine. It also says it connects, sends a message, and waits for an ACK.

    Now...if I understand sockets correctly, you can't have 2 connections made to the same port, unless you are handing off connections to another handler for processing, and leaving the original port open for new connects, right?

    Since I'm not doing any of that....how can this be?

    Is this a client problem?
    Is the OS (Win32) doing some internal stuff I'm not aware of?


    -HaB


    hword.