Click or drag to resize

ProtocolAddressBuilder Constructor (String)

Contructs a new protocol address builder with the specified string address.

Namespace:  Demo3D.Net
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 10.0.0.0 (10.0.0.0)
Syntax
C#
public ProtocolAddressBuilder(
	string uri
)

Parameters

uri
Type: SystemString
The address.
Examples
C#
// 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
};
See Also