#include <OnixS/FIXEngine/FIX/Engine.h>
Definition at line 42 of file Engine.h.
◆ addListenNetworkInterfaceAndPort()
Adds a listen network interface and port for incoming connections.
- Parameters
-
| networkInterface | A listen network interface and port for incoming connections. The entry must specify both an IPv4 local interface and a port in the same string (for example, 127.0.0.1:5000). |
| stack | An externally managed reactor for acceptor sessions and the given listen network interface and port. |
- Exceptions
-
| An | exception if the entry is invalid, if it is not an IPv4 address, if a port is not specified, if the FIX Engine cannot start listening on the specified network interface and port, if the telecommunication level is disabled (the Listen Port is -1 or 0), or if a caller-owned listen network interface and port is added from a non-owning thread in ExternalThread mode. |
- Note
- In ExternalThread mode, a caller-owned listen network interface and port must be added on its owning thread.
-
This call is thread-safe.
◆ addListenNetworkInterfacesAndPorts()
Adds listen network interfaces and ports for incoming connections.
- Parameters
-
| interfaces | Listen network interfaces and ports for incoming connections. Each entry must specify both an IPv4 local interface and a port in the same string (for example, 127.0.0.1:5000). |
| stacks | Externally managed reactors for acceptor sessions and the given listen network interfaces and ports. |
- Exceptions
-
| An | exception if any entry is invalid, if it is not an IPv4 address, if a port is not specified, if the FIX Engine cannot start listening on the specified network interfaces and ports, if the telecommunication level is disabled (the Listen Port is -1 or 0), or if a caller-owned listen network interface and port is added from a non-owning thread in ExternalThread mode. |
- Note
- In ExternalThread mode, caller-owned listen network interfaces and ports must be added on their owning thread.
-
This call is thread-safe.
◆ addListenPort()
Adds a listen port for incoming connections. The default local network interface (ANY) is used, or EngineSettings::localNetworkInterface() if specified.
- Parameters
-
| port | A listen port for incoming connections. |
| stack | An externally managed reactor for acceptor sessions and the given listen port. |
- Exceptions
-
| An | exception if the FIX Engine cannot start listening on the specified port, if the telecommunication level is disabled (the Listen Port is -1 or 0), or if a caller-owned listen port is added from a non-owning thread in ExternalThread mode. |
- Note
- In ExternalThread mode, a caller-owned listen port must be added on its owning thread.
-
This call is thread-safe.
◆ addListenPorts()
Adds listen ports for incoming connections. The default local network interface (ANY) is used, or EngineSettings::localNetworkInterface() if specified.
- Parameters
-
| ports | Listen ports for incoming connections. |
| stacks | Externally managed reactors for acceptor sessions and the given listen ports. |
- Exceptions
-
| An | exception if the FIX Engine cannot start listening on the specified ports, if the telecommunication level is disabled (the Listen Port is -1 or 0), or if a caller-owned listen port is added from a non-owning thread in ExternalThread mode. |
- Note
- In ExternalThread mode, caller-owned listen ports must be added on their owning thread.
-
This call is thread-safe.
◆ addSessionDictionary()
| void addSessionDictionary |
( |
const std::string & | dictionaryFile | ) |
|
Adds the session level dictionary(s) from the XML file(s) with the description of the FIX Dictionary(s).
- Note
- More than one file could be specified. The symbol '|' is used as the file name delimiter.
- Parameters
-
| dictionaryFile | Specifies the path(s) to the XML file(s) with the description of the FIX Dictionary(s). |
- Exceptions
-
| The | OnixS::DomainException if there are standard dictionary(s) in the XML file(s). |
- Note
- This call is thread-safe.
◆ addSessionDictionaryFromString()
| void addSessionDictionaryFromString |
( |
const std::string & | dialectString | ) |
|
Adds the session level dictionary(s) from the plain text string with the description of the FIX Dictionary(s).
- Parameters
-
| dialectString | Specifies the plain text string with the description of the FIX Dictionary(s). |
- Exceptions
-
| The | OnixS::DomainException if there are standard dictionary(s) in the dialect string. |
- Note
- This call is thread-safe.
◆ addSslListenNetworkInterfaceAndPort()
Adds an SSL listen network interface and port for incoming SSL connections.
- Parameters
-
| networkInterface | A listen network interface and port for incoming SSL connections. The entry must specify both an IPv4 local interface and a port in the same string (for example, 127.0.0.1:5000). |
- Exceptions
-
| An | exception if the entry is invalid, if it is not an IPv4 address, if a port is not specified, if the FIX Engine cannot start listening on the specified SSL network interface and port, or if the telecommunication level is disabled (the Listen Port is -1 or 0). |
- Note
- This call is thread-safe.
◆ addSslListenNetworkInterfacesAndPorts()
Adds SSL listen network interfaces and ports for incoming SSL connections.
- Parameters
-
| interfaces | Listen network interfaces and ports for incoming SSL connections. Each entry must specify both an IPv4 local interface and a port in the same string (for example, 127.0.0.1:5000). |
- Exceptions
-
| An | exception if any entry is invalid, if it is not an IPv4 address, if a port is not specified, if the FIX Engine cannot start listening on the specified SSL network interfaces and ports, or if the telecommunication level is disabled (the Listen Port is -1 or 0). |
- Note
- This call is thread-safe.
◆ addSslListenPort()
| void addSslListenPort |
( |
int | port | ) |
|
Adds an SSL listen port for incoming SSL connections. The default local network interface (ANY) is used, or EngineSettings::sslLocalInterface() if specified.
- Exceptions
-
| An | exception if the FIX Engine cannot start listening on the specified SSL port, or if the telecommunication level is disabled (the Listen Port is -1 or 0). |
- Note
- This call is thread-safe.
◆ addSslListenPorts()
Adds SSL listen ports for incoming SSL connections. The default local network interface (ANY) is used, or EngineSettings::sslLocalInterface() if specified.
- Exceptions
-
| An | exception if the FIX Engine cannot start listening on the specified SSL ports, or if the telecommunication level is disabled (the Listen Port is -1 or 0). |
- Note
- This call is thread-safe.
◆ dictionaries()
Returns the array of loaded dictionaries.
◆ init() [1/5]
◆ init() [2/5]
Initializes the FIX Engine.
- Parameters
-
| settings | Engine settings. |
| stack | An instance(s) of an externally managed reactor for acceptor sessions. |
- Note
- This call is thread-safe.
◆ init() [3/5]
| Engine * init |
( |
const std::string & | configFile, |
|
|
const ISessionReactors & | stacks ) |
|
static |
◆ init() [4/5]
| Engine * init |
( |
const std::string & | configFile, |
|
|
ISessionReactor * | stack = nullptr ) |
|
static |
Initializes the FIX Engine.
- Parameters
-
| configFile | The configuration file. |
| stack | An instance(s) of an externally managed reactor for acceptor sessions. |
- Note
- This call is thread-safe.
◆ init() [5/5]
Initializes the FIX Engine.
- Parameters
-
| listenPort | The engine listens on this port for incoming connections. If '0' then only session-initiators can be created. If '-1' then the telecommunication level is disabled and only the message parsing/assembling can be used. |
| stack | An instance of an externally managed reactor for acceptor sessions. |
- Note
- This call is thread-safe.
◆ initFromString() [1/2]
| Engine * initFromString |
( |
const std::string & | configuration, |
|
|
const ISessionReactors & | stacks ) |
|
static |
◆ initFromString() [2/2]
| Engine * initFromString |
( |
const std::string & | configuration, |
|
|
ISessionReactor * | stack = nullptr ) |
|
static |
Initializes the FIX Engine.
- Parameters
-
| configuration | The configuration string. |
| stack | An instance(s) of an externally managed reactor for acceptor sessions. |
- Note
- This call is thread-safe.
◆ initialized()
Returns 'true' if the FIX Engine has been initialized, otherwise - 'false'.
- Note
- This call is thread-safe.
◆ instance()
Returns the Engine instance.
- Exceptions
-
| The | OnixS::DomainException if the FIX Engine has not been initialized yet. |
- Note
- This call is thread-safe.
◆ licenseExpirationDate()
Returns the Engine's license expiration date.
◆ listenPort()
Returns the listen port.
The FIX Engine listens on this port for incoming connections.
◆ log()
| void log |
( |
const std::string & | message | ) |
|
Logs the given user's message to FIX Engine's log file.
- Note
- This call is thread-safe.
◆ logDirectory()
| const std::string & logDirectory |
( |
| ) |
const |
Returns the Engine log directory.
Inbound and outbound FIX messages, session's state data, and the FIX Engine log file are stored in this directory.
◆ registerListener()
Registers the Engine listener.
- Exceptions
-
| An | exception if the listener is already registered. |
- Note
- This call is thread-safe.
◆ removeListenNetworkInterfaceAndPort()
Removes a listen network interface and port for incoming connections.
- Parameters
-
| networkInterface | A listen network interface and port for incoming connections. The entry must specify both an IPv4 local interface and a port in the same string (for example, 127.0.0.1:5000). |
- Exceptions
-
| An | exception if the entry is invalid, if it is not an IPv4 address, if a port is not specified, if the telecommunication level is disabled (the Listen Port is -1 or 0), or if a caller-owned listen network interface and port is removed from a non-owning thread in ExternalThread mode. |
- Note
- In ExternalThread mode, a caller-owned listen network interface and port must be removed on its owning thread.
-
This call is thread-safe.
◆ removeListenNetworkInterfacesAndPorts()
Removes listen network interfaces and ports for incoming connections.
- Parameters
-
| interfaces | Listen network interfaces and ports for incoming connections. Each entry must specify both an IPv4 local interface and a port in the same string (for example, 127.0.0.1:5000). |
- Exceptions
-
| An | exception if any entry is invalid, if it is not an IPv4 address, if a port is not specified, if the telecommunication level is disabled (the Listen Port is -1 or 0), or if a caller-owned listen network interfaces and ports are removed from a non-owning thread in ExternalThread mode. |
- Note
- In ExternalThread mode, caller-owned listen network interfaces and ports must be removed on their owning thread.
-
This call is thread-safe.
◆ removeListenPort()
| void removeListenPort |
( |
int | port | ) |
|
Removes a listen port for incoming connections for the default local network interface (ANY) or EngineSettings::localNetworkInterface() if specified.
- Exceptions
-
| An | exception if the telecommunication level is disabled (the Listen Port is -1 or 0), or if a caller-owned listen port is removed from a non-owning thread in ExternalThread mode. |
Removes only the active listener that matches the specified port on that local network interface. If no active listener matches, the call has no effect.
- Note
- In ExternalThread mode, a caller-owned listen port must be removed on its owning thread.
-
This call is thread-safe.
◆ removeListenPorts()
Removes listen ports for incoming connections for the default local network interface (ANY) or EngineSettings::localNetworkInterface() if specified.
- Exceptions
-
| An | exception if the telecommunication level is disabled (the Listen Port is -1 or 0), or if a caller-owned listen port is removed from a non-owning thread in ExternalThread mode. |
Removes only active listeners that match the specified ports on that local network interface. If no active listener matches a port, the call has no effect for that port.
- Note
- In ExternalThread mode, caller-owned listen ports must be removed on their owning thread.
-
This call is thread-safe.
◆ removeSslListenNetworkInterfaceAndPort()
Removes an SSL listen network interface and port for incoming SSL connections.
- Parameters
-
| networkInterface | A listen network interface and port for incoming SSL connections. The entry must specify both an IPv4 local interface and a port in the same string (for example, 127.0.0.1:5000). |
- Exceptions
-
| An | exception if the entry is invalid, if it is not an IPv4 address, if a port is not specified, or if the telecommunication level is disabled (the Listen Port is -1 or 0). |
- Note
- This call is thread-safe.
◆ removeSslListenNetworkInterfacesAndPorts()
Removes SSL listen network interfaces and ports for incoming SSL connections.
- Parameters
-
| interfaces | Listen network interfaces and ports for incoming SSL connections. Each entry must specify both an IPv4 local interface and a port in the same string (for example, 127.0.0.1:5000). |
- Exceptions
-
| An | exception if any entry is invalid, if it is not an IPv4 address, if a port is not specified, or if the telecommunication level is disabled (the Listen Port is -1 or 0). |
- Note
- This call is thread-safe.
◆ removeSslListenPort()
| void removeSslListenPort |
( |
int | port | ) |
|
Removes an SSL listen port for incoming SSL connections for the default local network interface (ANY) or EngineSettings::sslLocalInterface() if specified.
- Exceptions
-
| An | exception if the telecommunication level is disabled (the Listen Port is -1 or 0). |
Removes only the active SSL listener that matches the specified port on that local network interface. If no active SSL listener matches, the call has no effect.
- Note
- This call is thread-safe.
◆ removeSslListenPorts()
Removes SSL listen ports for incoming SSL connections for the default local network interface (ANY) or EngineSettings::sslLocalInterface() if specified.
- Exceptions
-
| An | exception if the telecommunication level is disabled (the Listen Port is -1 or 0). |
Removes only active SSL listeners that match the specified ports on that local network interface. If no active SSL listener matches a port, the call has no effect for that port.
- Note
- This call is thread-safe.
◆ settings()
Returns the current Engine-level settings.
◆ shutdown()
◆ synchronizeHighResolutionTimeServiceWithSystemTime()
| void synchronizeHighResolutionTimeServiceWithSystemTime |
( |
| ) |
|
Performs the synchronization of the high-resolution internal time service with the system time on the Windows OS. On OSes less than Windows 8 and Windows Server 2012, the internal high-resolution time service, is based on the QueryPerformanceCounter API. This service is synchronized with the system time only once when an application is started, as a result, a time difference can occur in time. Therefore, for such old windows versions, it makes sense to synchronize the internal time service periodically (e.g. once per day) with the system time to avoid time drift issues.
- Exceptions
-
| An | exception if there is a session in the non-disconnected state. |
- Note
- This call is thread-safe.
-
The method should be called when all sessions are disconnected to avoid time resynchronization side effects.
◆ unregisterListener()
| void unregisterListener |
( |
| ) |
|
Unregisters the Engine listener.
- Note
- This call is thread-safe.