Unix Programming - Socket identifiers

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > October 2005 > Socket identifiers





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Socket identifiers
rishi.shah@patni.com

2005-10-24, 3:48 pm

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?

David Schwartz

2005-10-24, 3:48 pm


<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


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com