Check your TCP settings for the Variable TIME_WAIT this is the interval that a socket stays open after it terminates to allow all traffic to clear.
________________________________ From: John Matthews <[email protected]> To: [email protected] Sent: Tuesday, January 20, 2009 1:44:34 PM Subject: [c-prog] Re: socket() ; SUCCESS but !!! --- In c-p...@yahoogroups. com, Ahmed Shabana <UnlimitedEng@ ...> wrote: > > it give error in bind() in the second time I ran the same program I don't get an error- what port value are you using? Try doing calling perror() when the bind() (or any other system call) fails, to tell you why it's failing. I remember something similar happening with a program I wrote - you just had to wait a while (approx a minute I think) for the system to release whatever resources it had allocated. But I can't remember if that was due to a bind() or something else. Do you still get the error if you wait for a couple of minutes before running again? John [Non-text portions of this message have been removed]
