-
Dec 7th, 2017, 07:50 PM
#1
Thread Starter
Fanatic Member
[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.
-
Dec 7th, 2017, 09:11 PM
#2
Re: MsWinSck working with multi-ethernet
See the Bind method, which you should already be using anyway.
-
Dec 7th, 2017, 09:32 PM
#3
Thread Starter
Fanatic Member
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?
-
Dec 7th, 2017, 09:38 PM
#4
Thread Starter
Fanatic Member
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?
-
Dec 8th, 2017, 08:42 AM
#5
Re: MsWinSck working with multi-ethernet
You must still call Listen after Bind.
-
Dec 8th, 2017, 09:27 AM
#6
Thread Starter
Fanatic Member
Re: MsWinSck working with multi-ethernet
Originally Posted by dilettante
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|