This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: socket programming


The socket is not bound to a process anymore after killign the process. But it might depend on the type of socket, if the port will be available again.
For further information see the socket api documentation.


I assume you are using stream sockets, if so, this is realted to the inner workings of the tcp protocol.

netstat should give you an overview of you sockets and their states.

Regards

-Sven


ranjith kumar schrieb:
hi,

         I wrote a two .c files which communicates through socket programming.
I am getting "bind error" when I tried to run those programms again.

I know that "ipcs" command will display all shared memories currently
being used.
My question is there any way(command) to  know all sockets currently
created/used in unix.

Even after I kill a prosess which creates a socket and binds to it,
why its socket is not freed.

Thanks in advance


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]