Interface selection

Discussion in 'Python' started by ias0nas@lycos.com, Mar 25, 2005.

  1. Guest

    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
    , Mar 25, 2005
    #1
    1. Advertising

  2. 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
    Diez B. Roggisch, Mar 25, 2005
    #2
    1. Advertising

  3. Guest

    Actually its not a server. I dont do any binding call, just a connect.
    , Mar 25, 2005
    #3
  4. 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
    Diez B. Roggisch, Mar 25, 2005
    #4
  5. Serge Orlov Guest

    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.
    Serge Orlov, Mar 25, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon Niederberger
    Replies:
    2
    Views:
    16,499
    Christian Kaufhold
    Jan 7, 2005
  2. Andrew Crowe
    Replies:
    1
    Views:
    4,460
    Andrew Crowe
    Sep 13, 2004
  3. curiousity

    HOWTO autopost the selection list upon selection

    curiousity, Nov 21, 2003, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    267
    curiousity
    Nov 21, 2003
  4. Loebb
    Replies:
    0
    Views:
    200
    Loebb
    Feb 23, 2004
  5. Replies:
    1
    Views:
    208
Loading...

Share This Page