Exemplo n.º 1
0
        void OnTcpPacketReceived(string data)
        {
            lastMessageReceived.Touch();
            List <string>    names;
            List <QuoteData> quotes;

            //Logger.InfoFormat("TCP Feeder: data is {0}", data);
            QuoteFeederParser.ParseQuotes(data, out names, out quotes);
            //Logger.InfoFormat("TCP Feeder: got {0} quotes", quotes.Count);
            if (quotesReceived != null)
            {
                quotesReceived(names, quotes);
            }
        }
Exemplo n.º 2
0
        private void ParseAndSendQuotes(byte[] data, int count)
        {
            if (count == 0)
            {
                return;
            }

            List <string>    names  = null;
            List <QuoteData> quotes = null;

            if (parseQuoteMt4FeederFormat)
            {
                names = ParseQuotesMt4Style(data, ref quotes);
            }
            else
            {
                QuoteFeederParser.ParseQuotes(data, count, out names, out quotes);
            }

            if (onQuotesReceived != null)
            {
                onQuotesReceived(names, quotes);
            }
        }