public Level1Snapshot(SocketClient socketClient, Level1RequestFormatter level1RequestFormatter, ILevel1MessageHandler level1MessageHandler, TimeSpan timeout)
 {
     _timeout                = timeout;
     _socketClient           = socketClient;
     _level1RequestFormatter = level1RequestFormatter;
     _level1MessageHandler   = level1MessageHandler;
 }
Ejemplo n.º 2
0
 public Level1Snapshot(SocketClient socketClient, Level1RequestFormatter level1RequestFormatter, Level1MessageHandler level1MessageHandler, int timeoutMs)
 {
     _socketClient           = socketClient;
     _level1RequestFormatter = level1RequestFormatter;
     _level1MessageHandler   = level1MessageHandler;
     _timeoutMs = timeoutMs;
 }
        public static Level1Client CreateNew(string host, int port, TimeSpan snapshotTimeout, ILevel1MessageHandler level1MessageHandler)
        {
            var socketClient           = new SocketClient(host, port);
            var level1RequestFormatter = new Level1RequestFormatter();

            return(new Level1Client(
                       socketClient,
                       level1RequestFormatter,
                       level1MessageHandler,
                       new Level1Snapshot(socketClient, level1RequestFormatter, level1MessageHandler, snapshotTimeout)
                       ));
        }
        public static Level1Client CreateNew(string host = IQFeedDefault.Hostname, int port = IQFeedDefault.Level1Port, int snapshotTimeoutMs = Level1Default.SnapshotTimeoutMs)
        {
            var socketClient           = new SocketClient(host, port);
            var level1RequestFormatter = new Level1RequestFormatter();
            var level1MessageHandler   = new Level1MessageHandler();

            return(new Level1Client(
                       socketClient,
                       level1RequestFormatter,
                       level1MessageHandler,
                       new Level1Snapshot(socketClient, level1RequestFormatter, level1MessageHandler, snapshotTimeoutMs)
                       ));
        }
Ejemplo n.º 5
0
 public BaseLevel1Client(SocketClient socketClient, Level1RequestFormatter level1RequestFormatter)
 {
     _socketClient           = socketClient;
     _level1RequestFormatter = level1RequestFormatter;
 }