예제 #1
0
 ///<inheritdoc cref="IMatchingEngineClient"/>
 public TcpMatchingEngineClient(
     MeClientSettings settings,
     ILogFactory logFactory)
 {
     CreatePolicies(logFactory.CreateLog(this));
     _enableRetries   = settings.EnableRetries;
     _clientTcpSocket = new ClientTcpSocket <MatchingEngineSerializer, TcpOrderSocketService>(
         logFactory,
         settings,
         () =>
     {
         _tcpOrderSocketService = new TcpOrderSocketService(
             _tasksManager,
             _newTasksManager,
             _marketOrderTasksManager,
             _multiLimitOrderTasksManager,
             logFactory,
             settings.IgnoreErrors);
         return(_tcpOrderSocketService);
     });
 }
예제 #2
0
 ///<inheritdoc cref="IMatchingEngineClient"/>
 public TcpMatchingEngineClient(
     IPEndPoint ipEndPoint,
     ILogFactory logFactory,
     bool enableRetries,
     bool ignoreErrors = false)
 {
     _enableRetries = enableRetries;
     CreatePolicies(logFactory.CreateLog(this));
     _clientTcpSocket = new ClientTcpSocket <MatchingEngineSerializer, TcpOrderSocketService>(
         logFactory,
         ipEndPoint,
         (int)_defaultReconnectTimeOut.TotalMilliseconds,
         () =>
     {
         _tcpOrderSocketService = new TcpOrderSocketService(
             _tasksManager,
             _newTasksManager,
             _marketOrderTasksManager,
             _multiLimitOrderTasksManager,
             logFactory,
             ignoreErrors);
         return(_tcpOrderSocketService);
     });
 }