This project has moved and is read-only. For the latest updates, please go here.

[EN] PC with multihome network (solved)

Topics: Technical Support
Sep 22, 2015 at 8:00 PM
Edited Sep 22, 2015 at 8:00 PM
I try create project with Zyan
On my PC
System.Net.IPAddress[] addresses =   System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName());
addresses contains 3 addresses
[0]: {::1}
[1]: {}
[2]: {}
How I can specify concrete IP address for code:
    m_ProtocolSetup = new TcpCustomServerProtocolSetup ( 8080, new NullAuthenticationProvider(), true);
      m_Host = new ZyanComponentHost(hostname, m_ProtocolSetup);
This code always use [1]: {} address.
Sep 22, 2015 at 10:54 PM
This code always use [1]: {} address
Please explain what do you mean by «always use».

Tcp channel binds to all available network interfaces, so you can connect to server using any of these addresses.
If you need to listen on an exact interface, Tcp channel can be instructed to do so using ChannelSettings property:
protocolSetup.ChannelSettings["bindTo"] = "";
Regards, Alex
Marked as answer by yallie on 9/23/2015 at 11:49 PM