Multiple Listen Ports
To accept inbound connections on multiple ports simultaneously, these ports should be specified during the Engine initialization, using the ListenPorts property.
If a session-acceptor should be bound to a specific listen port, then this port should be set via the ListenPort property.
If there is an inbound FIX connection on one of the configured listen ports, and the corresponding FIX session-acceptor is found without the specified listen port or with the same specified listen ports as the 'active' listen port, then the inbound FIX connection is accepted.
If the corresponding FIX session-acceptor is found, but the specified session listen port is not the same as the 'active' listen port, then the inbound FIX connection is terminated.
For example:
EngineSettings settings = new EngineSettings();
settings.ListenPorts.AddRange(new int[] { 9001, 9002 });
Engine.Init(settings);
var firstAcceptor = new Session("Acceptor_1", "Initiator_1", ProtocolVersion.Fix44);
firstAcceptor.LogonAsAcceptor();
var secondAcceptor = new Session("Acceptor_2", "Initiator_2", ProtocolVersion.Fix44);
secondAcceptor.LogonAsAcceptor();
var firstInitiator = new Session("Initiator_1", "Acceptor_1", ProtocolVersion.Fix44);
firstInitiator.LogonAsInitiator("localhost", 9001);
var secondInitiator = new Session("Initiator_2", "Acceptor_2", ProtocolVersion.Fix44);
secondInitiator.LogonAsInitiator("localhost", 9002);
// Message exchange ...
firstInitiator.Logout();
secondInitiator.Logout();