time_wait - Programmer

This is a discussion on time_wait - Programmer ; Following: A server has an ip-address and a port A Client connects to this server send/recs some datas and disconnects After that on the client the port has the state time_wait and reconnection to this port gives the failure WSAEADDRINUSE. ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: time_wait

  1. time_wait

    Following:
    A server has an ip-address and a port

    A Client connects to this server send/recs some datas and disconnects

    After that on the client the port has the state time_wait and reconnection
    to this port gives the failure WSAEADDRINUSE.

    Whats wrong?

    Christian



  2. Re: time_wait


    "Christian Schmitz" wrote in message
    news:feu5ob$d01$03$1@news.t-online.com...
    > Following:
    > A server has an ip-address and a port
    >
    > A Client connects to this server send/recs some datas and disconnects
    >
    > After that on the client the port has the state time_wait and reconnection
    > to this port gives the failure WSAEADDRINUSE.
    >
    > Whats wrong?
    >
    > Christian
    >
    >
    >


    Nothing is wrong: that's the way it's supposed to work. You cannot reuse a
    socket descriptor during its TIME_WAIT state.

    At least you can't unless you also specify the SO_REUSEADDR option, but
    generally this should be avoided especially if you are not familiar with the
    TIME_WAIT state and the reason for its existence.



+ Reply to Thread