Esempio n. 1
0
 public Level2Snapshot(
     SocketClient socketClient,
     Level2RequestFormatter level2RequestFormatter,
     ILevel2MessageHandler <T> level2MessageHandler,
     TimeSpan timeout)
 {
     _socketClient           = socketClient;
     _level2RequestFormatter = level2RequestFormatter;
     _level2MessageHandler   = level2MessageHandler;
     _timeout = timeout;
 }
        public static Level2Client CreateNew(string host, int port, TimeSpan snapshotTimeout)
        {
            var socketClient           = new SocketClient(host, port);
            var level2RequestFormatter = new Level2RequestFormatter();
            var level2MessageHandler   = new Level2MessageHandler();

            return(new Level2Client(
                       socketClient,
                       level2RequestFormatter,
                       level2MessageHandler,
                       new Level2Snapshot(socketClient, level2RequestFormatter, level2MessageHandler, snapshotTimeout)
                       ));
        }
Esempio n. 3
0
        public static Level2Client CreateNew(string host, int port, TimeSpan snapshotTimeout, string protocolVersion = IQFeedDefault.ProtocolVersion)
        {
            var socketClient           = new SocketClient(host, port);
            var level2RequestFormatter = new Level2RequestFormatter();
            var level2MessageHandler   = new Level2MessageHandler();

            return(new Level2Client(
                       socketClient,
                       level2RequestFormatter,
                       level2MessageHandler,
                       new Level2Snapshot(socketClient, level2RequestFormatter, level2MessageHandler, snapshotTimeout),
                       protocolVersion
                       ));
        }