By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,199 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,199 IT Pros & Developers. It's quick & easy.

Interface selection

P: n/a
Hello,

How can I select on wich interface a socket will connect to?
Say I have a pc with one network card and a 56K modem, how can I select
on wich interface will the socket connect?

Thank you

Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
ia*****@lycos.com wrote:
Hello,

How can I select on wich interface a socket will connect to?
Say I have a pc with one network card and a 56K modem, how can I select
on wich interface will the socket connect?


you need to specify the ip address that interface has been assigned to in
the bind-call.
--
Regards,

Diez B. Roggisch
Jul 18 '05 #2

P: n/a
Actually its not a server. I dont do any binding call, just a connect.

Jul 18 '05 #3

P: n/a
ia*****@lycos.com wrote:
Actually its not a server. I dont do any binding call, just a connect.


Then where is your problem? The two interfaces have been assigned distinct
IPs, so connect to the appropriate one.

--
Regards,

Diez B. Roggisch
Jul 18 '05 #4

P: n/a
ia*****@lycos.com wrote:
Actually its not a server. I dont do any binding call, just a

connect.

Bind is not only for server sockets. Googling for "bind client socket"
reveals an example: http://woozle.org/~neale/papers/sockets.html

Serge.

Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.