Socket binding

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Right, I have a box with multiple IP addresses assigned to it.

What I want is to be able to connect to elsewhere, appearing as each of those
IPs. I currently have code where no source IP is set as the extra addresses
are a new thing to me.

It looks like it's possible using socket_bind() but that's a bit too low level
for me, and makes use of an experimental extension module.

Ideally I would like to be able to bind fsockopen() to a particular IP, then
repeat and bind it to another IP - is this possible at all? I already have the
code which deals with fgets() and fwrite(), so it would be much easier as I'm
not sure how to implement them using the other socket extension.

Hope that makes sense :) This is my first post here.


My Realm:
'Drink up.  The worlds about to end.'

Re: Socket binding

Linux Jay wrote:
Quoted text here. Click to load it

Still, socket_bind() is your friend. And AFAIK, the extension isn't  
experimental anymore (see ).

The degree of low-level is not too bad, as you will see with the example on  
the man page ( )


Site Timeline