Socket identifiers

  • Follow


If I am creating multiple sockets in a loop and also accepting new
connections, then are the socket identifiers always uniquely assigned
in unix?
If I use the pipe command and the socket command in the same program
then will unix maintain the uniqueness of pipe identifiers and socket
identifiers combined?

0
Reply rishi.shah (13) 10/22/2005 4:00:21 AM

<rishi.shah@patni.com> wrote in message 
news:1129953621.028002.206150@g14g2000cwa.googlegroups.com...

> If I am creating multiple sockets in a loop and also accepting new
> connections, then are the socket identifiers always uniquely assigned
> in unix?

    Obviously two different sockets can't have the same identifier at the 
same time.

> If I use the pipe command and the socket command in the same program
> then will unix maintain the uniqueness of pipe identifiers and socket
> identifiers combined?

    A socket and a pipe can't have the same identifier because they share 
namespace. For example, the 'close' function can be used to close either a 
socket descriptor or a pipe descriptor.

    DS


0
Reply David 10/22/2005 4:48:57 AM


1 Replies
123 Views

(page loaded in 0.043 seconds)

Similiar Articles:













7/16/2012 7:35:19 PM


Reply: