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)
                       ));
        }
Exemplo n.º 2
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
                       ));
        }