On Mon, 17 Aug 2009 11:21:44 -0700, Bert Hyman <(E-Mail Removed)> wrote:
> In news
(E-Mail Removed) "Peter Duniho"
> <(E-Mail Removed)> wrote:
>
>> On Mon, 17 Aug 2009 10:49:26 -0700, Bert Hyman <(E-Mail Removed)>
>> wrote:
>>
>>> In news
(E-Mail Removed) "Peter Duniho"
>>> <(E-Mail Removed)> wrote:
>>>
>>>> The binding of a socket doesn't determine the route the data takes;
>>>
>>> It doesn't affect the "route" once the packet leaves the PC, but
>>> allows you to attach your socket to a specific interface, if your
>>> machine has more than one.
>>
>> No, not really. The remote endpoint will be guaranteed to see your
>> endpoint as that IP address, but there's no guarantee about how data
>> from your endpoint will get to the remote endpoint, even when the
>> socket is bound to a specific IP address.
>
> Nowhere do I mention the remote endpoint or the route your packet will
> take to a remote endpoint, and the bind function doesn't either.
Whatever. The remote endpoint is implied in _any_ discussion of
networking, and you even quoted your own post where you "mentioned" the
"route". See above. I don't see how you can say that you didn't mention
it, given that it's there in plain view in your own previous post.
> If your machine has multiple interfaces, each with a different IP
> address, the bind function allows you to attach your socket to a
> specific interface before performing a listen or connect.
Unfortunately, the word "attach" is at best a synonym for "bind", and at
worst has no precise technical meaning. Either way, saying that the "bind
function allows you to attach your socket" is either meaningless,
irrelevant, or incorrect. Take your pick.
The OP asked for control over which adapter is _used_, not which IP
address to which the socket is bound, so it's reasonable to assume you
were trying to answer the former question, not the latter. But your
answer doesn't address the former question, thus my reply.
If you _aren't_ trying to answer the question about how to control which
adapter is actually _used_, then you aren't trying to answer the question
that was asked. And that seems a little pointless.
Pete