I got a very simple TCP client/server program.
My program worked fine first time, then it failed
when I tried re-run (use the same port as before)
it within a couple minutes. It's failed to bind.
But, if I waited a few minutes, it will work again.
I am sure I closed all socket descriptors before
My test programs are similar to those two
I tried my programs on SunOs and Linux, it behaves
the same. I wonder it's a general problem for all
TCP socket progams or something wrong with my program.
Maybe the OS needs time to release the port back
to the pool?
Does anyone got any ideas?