Results 1 to 6 of 6

Thread: [RESOLVED] MsWinSck working with multi-ethernet

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Resolved [RESOLVED] MsWinSck working with multi-ethernet

    A customer has a server, which has two ethernet cards gygalan.... , one is setup like IP 192.168.1.100 ... and the other is setup 192.168.1.101.

    How I do force, the MsWinSck .Listen procedure, to listen for new connections in a specific LOCAL IP and not (whatever it is priorized first). And ofcourse that then the connections uses that specific card only and not the other.

    Why? because the system sometime startup with one ethernet first, and sometimes it startup with the other ethernet FIRST. So, priorization in a given way is not guarantee.

    PD: Why it has two ethernets in the same range of IP, same subnet? because it is doing iscsi virtualizaciĆ³n , those server normaly has two or more ethernet depend on the clients count. And my VB app suffer that situation.

    We tried to setup a priorization list, the sort in which ethernets must appear, but that sort changes depending on which driver loads and connect first. Like a driver race! Windows server 2012.... don't understand why Windows allow that race.
    Last edited by flyguille; Dec 7th, 2017 at 07:58 PM.

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: MsWinSck working with multi-ethernet

    See the Bind method, which you should already be using anyway.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: MsWinSck working with multi-ethernet

    I am running TCP connections only, It uses .Listen , but if it is exchangeable I can try .Bind.... but what is the difference?

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: MsWinSck working with multi-ethernet

    ok found info.

    so if instead of sck.listen I do, sck.bind <port> , <IP>

    Everything ELSE is the same thing? no channges in the events?

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: MsWinSck working with multi-ethernet

    You must still call Listen after Bind.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: MsWinSck working with multi-ethernet

    Quote Originally Posted by dilettante View Post
    You must still call Listen after Bind.
    Ok, thanks by the advice!.

    Now it works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width