forwardLocal Network Interface   Table of ContentTLS/SSL Encryptionforward
Specifying Multiple Listen Ports

To accept (listen for) incoming connections on multiple ports simultaneously, these ports should be specified during Engine initialization, using either the ListenPort Engine configuration setting or the ListenPorts property.

If a session-acceptor should be bound to a specific listen port, then this port is explicitly defined via the ListenPort property.

If there is an incoming 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, the incoming 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 incoming FIX connection is terminated.

EngineSettings settings = new EngineSettings();
settings.ListenPorts = new int[] { 9001, 9002 };


Session firstAcceptor = new Session(
    "Acceptor_1", "Initiator_1", ProtocolVersion.FIX44);


Session secondAcceptor = new Session(
    "Acceptor_2", "Initiator_2", ProtocolVersion.FIX44);


Session firstInitiator = new Session(
    "Initiator_1", "Acceptor_1", ProtocolVersion.FIX44);

firstInitiator.LogonAsInitiator("localhost", 9001);

Session secondInitiator = new Session(
    "Initiator_2", "Acceptor_2", ProtocolVersion.FIX44);

secondInitiator.LogonAsInitiator("localhost", 9002);

// Message exchange goes here.


// ..