|
|
|
|
||||||
| comp.protocols.tcp-ip TCP and IP network protocols. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
HI All,
I terminate (ctrl+C) my tcp server when one(or more) of the client(s) were connected. And unable to restart again for a long time. The netstat shows the port is in TIME_WAIT. How to handle such that even after abrupt shutdown the server should restart successfully on the same port. Thanks Prabu |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
A setsockopt() with SO_REUSEADDR before you attempt to bind() to the
well-known port number for your server. The works of W. Richard Stevens and/or Stallings re network programming would probably be good things to have handy on the shelf. rick jones -- Wisdom Teeth are impacted, people are affected by the effects of events. these opinions are mine, all mine; HP might not want them anyway... ![]() feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH... |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Apr 4, 9:49 pm, Rick Jones <rick.jon...@hp.com> wrote:
> A setsockopt() with SO_REUSEADDR before you attempt to bind() to the > well-known port number for your server. > > The works of W. Richard Stevens and/or Stallings re network > programming would probably be good things to have handy on the shelf. > > rick jones > -- > Wisdom Teeth are impacted, people are affected by the effects of events. > these opinions are mine, all mine; HP might not want them anyway... ![]() > feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH... Dear Rick Jones, Thanks. It works fine. Thanks for your With Regards, Prabu |
|
![]() |
| Outils de la discussion | |
|
|