ProtocolAddressBuilder Constructor (String) |
Namespace: Demo3D.Net
// Returns "tcp://host:port/". var tcpClientAddress = new ProtocolAddressBuilder(TCP.Scheme, host, port).Address; // Alternatively var builder = new ProtocolAddressBuilder(); builder.Scheme = TCP.Scheme; builder.Host = host; builder.Port = port; var tcpClientAddress2 = builder.Address; // Returns "tcp://any:port/". // The hostname "any" is a special hostname for servers accepting connections on all interface cards. var tcpServerAddress = new ProtocolAddressBuilder(TCP.Scheme, null, port).Address; // Returns "cotp://host/tsap". var cotpClientAddress = new ProtocolAddressBuilder(COTP.Scheme, host, -1, tsap).Address; // Construct an address from a string template, and then set the port number. var modbusAddress = new ProtocolAddressBuilder("modbus://host") { Port = 1234 };