示例#1
0
 public TcpQuoteReceiver()
 {
     client = new TcpReceiverClient(AppConfig.GetStringParam("Quote.ServerHost", "70.38.11.49"),
         AppConfig.GetIntParam("Quote.ServerPort", 55056));
     client.OnTcpPacketReceived += OnTcpPacketReceived;
     client.Connect();
     processQuotesThread = new Thread(ProcessQuotesLoop);
     processNewsThread = new Thread(ProcessNewsLoop);
     lastMessageReceived.Touch();
     processQuotesThread.Start();
     processNewsThread.Start();
 }
示例#2
0
 private void StartTcpReceiver()
 {
     var targetSock = AppConfig.GetStringParam("TCP.Source", "127.0.0.1:8600");
     var parts = targetSock.Split(':');
     var host = parts[0];
     var port = parts[1].ToInt();
     receiver = new TcpReceiverClient(host, port);
     receiver.OnTcpPacketReceived += OnTcpPacketReceived;
     receiver.Connect();
 }