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. Advertisements

  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. Advertisements

  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. Advertisements

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. Wildepiet
    Replies:
    0
    Views:
    1,992
    Wildepiet
    Jun 14, 2004
  2. Simon Niederberger
    Replies:
    2
    Views:
    18,379
    Christian Kaufhold
    Jan 7, 2005
  3. cyberco
    Replies:
    8
    Views:
    657
    cyberco
    Feb 25, 2006
  4. Andrew Crowe
    Replies:
    1
    Views:
    4,938
    Andrew Crowe
    Sep 13, 2004
  5. curiousity

    HOWTO autopost the selection list upon selection

    curiousity, Nov 21, 2003, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    408
    curiousity
    Nov 21, 2003
  6. Loebb
    Replies:
    0
    Views:
    335
    Loebb
    Feb 23, 2004
  7. Replies:
    0
    Views:
    472
  8. Replies:
    1
    Views:
    339
Loading...