Exemplo n.º 1
0
        /// <summary>
        /// Add username and password before sending the message
        /// </summary>
        /// <param name="message"></param>
        /// <param name="sessionId"></param>
        private void OnMessage(QuickFix.FIX42.Logon message, SessionID sessionId)
        {
            try
            {
                QuickFix.Fields.EncryptMethod   encryptMethod   = new QuickFix.Fields.EncryptMethod(0);
                QuickFix.Fields.HeartBtInt      heartBtInt      = new QuickFix.Fields.HeartBtInt(30);
                QuickFix.Fields.ResetSeqNumFlag resetSeqNumFlag = new QuickFix.Fields.ResetSeqNumFlag(true);

                message.SetField(encryptMethod);
                message.SetField(heartBtInt);
            }
            catch (Exception exception)
            {
                Logger.Error(exception.ToString(), _type.FullName, "OnMessage");
            }
        }
Exemplo n.º 2
0
        void SendLogon(Socket s, string senderCompID)
        {
            var msg = new QuickFix.FIX42.Logon();

            msg.Header.SetField(new QuickFix.Fields.TargetCompID(ServerCompID));
            msg.Header.SetField(new QuickFix.Fields.SenderCompID(senderCompID));
            msg.Header.SetField(new QuickFix.Fields.MsgSeqNum(1));
            msg.Header.SetField(new QuickFix.Fields.SendingTime(System.DateTime.UtcNow));
            msg.SetField(new QuickFix.Fields.HeartBtInt(300));
            s.Send(Encoding.ASCII.GetBytes(msg.ToString()));
        }
        void SendLogon(Socket s, string senderCompID)
        {
            var msg = new QuickFix.FIX42.Logon();

            msg.Header.SetField(new QuickFix.Fields.TargetCompID(ServerCompID));
            msg.Header.SetField(new QuickFix.Fields.SenderCompID(senderCompID));
            msg.Header.SetField(new QuickFix.Fields.MsgSeqNum(1));
            msg.Header.SetField(new QuickFix.Fields.SendingTime(System.DateTime.UtcNow));
            msg.SetField(new QuickFix.Fields.HeartBtInt(300));
            // Simple logon message, use default encoding
            s.Send(SessionFactory.DefaultEncoding.GetBytes(msg.ToString()));
        }
Exemplo n.º 4
0
 void SendLogon(Socket s, string senderCompID)
 {
     var msg = new QuickFix.FIX42.Logon();
     msg.Header.SetField(new QuickFix.Fields.TargetCompID(ServerCompID));
     msg.Header.SetField(new QuickFix.Fields.SenderCompID(senderCompID));
     msg.Header.SetField(new QuickFix.Fields.MsgSeqNum(1));
     msg.Header.SetField(new QuickFix.Fields.SendingTime(System.DateTime.UtcNow));
     msg.SetField(new QuickFix.Fields.HeartBtInt(300));
     s.Send(Encoding.ASCII.GetBytes(msg.ToString()));
 }