[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: why cannot bind to someipaddress:port when something else has *:port bound?
When you bind a socket to a certain address:port, it's a way to tell the
kernel that any data that gets to that address:port combination should
be copied in the socket buffer so read() requests on the socket
descriptor will return the data.
Imagine two different daemons binding to the same address:port, and both
receiving the data. How could a client tell which daemon it's trying to
contact in such a situation?
horape@tinuviel.compendium.net.ar wrote:
>
> ¡Hola!
>
> The following program binds *:1000 to a socket, and then tries to bind
> 200.47.36.254:1000 to another socket, the error i gets is "Address
> already in use". Why?
>
> I am not asking for a "you're not allowed to do that", I know. I don't
> ask for a "why are you trying to do that?", I amn't trying. But I need
> to know why that's not permited. I know vaguely but i need a more sound
> explanation. A pointer to a mailing list/usenet archive where the subject
> was discussed in the past would be great.
>
> Just another time, i am asking for the theory about why that shouldn't
> be allowed. Not the fact that it's not allowed.
-jf