Esempio n. 1
0
        public Session Session(string ipaddress, Int16 port, string sendercompid, string targetcompid, string fixversion, int heartbeat)
        {
            Byte[] sessiondesc = SessionDesc(ipaddress, port, sendercompid, targetcompid, fixversion, heartbeat);
            Session s;
            if (m_Sessions.TryGetValue(sessiondesc, out s))
            {
                return s;
            }
            else
            {
                s = new Session(ipaddress, port, sendercompid, targetcompid, fixversion, heartbeat);
                m_Sessions.Add(sessiondesc, s);
                //start talking to the server in other thread and
                new SecretObtainer(this, sessiondesc);

                return s;
            }
        }
Esempio n. 2
0
 public SecretObtainer(Session session, Byte[] descriptor)
 {
     m_Session = session;
     m_Descriptor = descriptor;
     new Thread(new ThreadStart(getSecret)).Start();
 }