public SimpleTcpSocketConnection(SimpleClientTcpSocket socket, TcpClient tcpClient, ISocketSerializer socketSerializer, int id, ISocketLog socketLog) { _socket = socket; _tcpClient = tcpClient; _socketSerializer = socketSerializer; Id = id; _log = socketLog; }
public ClientTcpSocket(ISocketLog log, IPEndPoint ipEndPoint, int reconnectTimeOut, Func <TService> srvFactory) { SocketStatistic = new SocketStatistic(); _log = log; _ipEndPoint = ipEndPoint; _reconnectTimeOut = reconnectTimeOut; _srvFactory = srvFactory; }
public SimpleClientTcpSocket(string socketName, IPEndPoint ipEndPoint, int reconnectTimeOut, ISocketSerializer serializer, ISocketLog socketLog = null, int pingTimeOut = 4, int packetDeliveryTimeOut = 2) { SocketName = socketName; _ipEndPoint = ipEndPoint; _reconnectTimeOut = reconnectTimeOut; _serializer = serializer; _socketLog = socketLog; PingTimeOut = pingTimeOut; PacketDeliveryTimeOut = packetDeliveryTimeOut; }
public ServerTcpSocket(IPEndPoint ipEndPoint, ISocketLog log, Func <TService> srvFactory) { _srvFactory = srvFactory; _ipEndPoint = ipEndPoint; Log = log; _connections = new Connections(log); SocketStatistic = new SocketStatistic(); }
public TcpConnection(ITcpService tcpService, ITcpSerializer tcpSerializer, TcpClient socket, SocketStatistic socketStatistic, ISocketLog log, int id) { Id = id; _tcpSerializer = tcpSerializer; _socket = socket; _socketStatistic = socketStatistic; _log = log; TcpService = tcpService; tcpService.SendDataToSocket = SendDataToSocket; _socketStatistic.LastConnectionTime = DateTime.UtcNow; }
public TcpClientMatchingEngineConnector(IPEndPoint ipEndPoint, ISocketLog socketLog = null) { _clientTcpSocket = new ClientTcpSocket <MatchingEngineSerializer, TcpOrderSocketService>( socketLog, ipEndPoint, 3000, () => { _tcpOrderSocketService = new TcpOrderSocketService(_tasksManager); return(_tcpOrderSocketService); }); }
public TcpOrderSocketService(TasksManager <TheResponseModel> tasksManager, TasksManager <TheNewResponseModel> newTasksManager, TasksManager <MarketOrderResponseModel> marketOrdersTasksManager, TasksManager <MeMultiLimitOrderResponseModel> multiOrdersTasksManager, ISocketLog logger = null, bool ignoreErrors = false) { _tasksManager = tasksManager; _newTasksManager = newTasksManager; _marketOrdersTasksManager = marketOrdersTasksManager; _multiOrdersTasksManager = multiOrdersTasksManager; _legacyLog = logger; _ignoreErrors = ignoreErrors; }
public Connections(ISocketLog log) { _log = log; }
public SimpleClientTcpSocket(string socketName, IPEndPoint ipEndPoint, int reconnectTimeOut, ISocketSerializer serializer, ISocketLog socketLog = null, int pingTimeOut = 4, int packetDeliveryTimeOut=2) { SocketName = socketName; _ipEndPoint = ipEndPoint; _reconnectTimeOut = reconnectTimeOut; _serializer = serializer; _socketLog = socketLog; PingTimeOut = pingTimeOut; PacketDeliveryTimeOut = packetDeliveryTimeOut; }