Exemplo n.º 1
0
 def onMessage(self, responseMsg):
     GatewaySession.onMessage(self, responseMsg)
     if responseMsg.ID == isefix.LogonResp.ID:
         self._setThrottlingRate(responseMsg)
         self.loggedIn = True
     
     if responseMsg.ID == isefix.Reject.ID and responseMsg.ResponseHeader.MsgSeqNum == 1:
         self.logonRejected = True
         self.logonRejectedReason = responseMsg.Text
Exemplo n.º 2
0
    def onMessage(self, responseMsg):
        GatewaySession.onMessage(self, responseMsg)
        if responseMsg.ID == isefix.LogonResp.ID:
            self._setThrottlingRate(responseMsg)
            self.loggedIn = True

        if responseMsg.ID == isefix.Reject.ID and responseMsg.ResponseHeader.MsgSeqNum == 1:
            self.logonRejected = True
            self.logonRejectedReason = responseMsg.Text
Exemplo n.º 3
0
    def login(self):
        GatewaySession.login(self)
        st_time = time.time()
        timedOut = False
        while not self.loggedIn and not self.logonRejected and not timedOut:
            time.sleep(0.1)
            timedOut = (time.time() - st_time) > self.LOGIN_TIMEOUT_SECS

        if timedOut:
            self.logonRejected = True
            self.logonRejectedReason = "No response received in %s" % self.LOGIN_TIMEOUT_SECS
Exemplo n.º 4
0
    def login(self):
        GatewaySession.login(self)
        st_time = time.time()
        timedOut = False
        while not self.loggedIn and not self.logonRejected and not timedOut:
            time.sleep(0.1)
            timedOut = (time.time() - st_time) > self.LOGIN_TIMEOUT_SECS

        if timedOut:
            self.logonRejected = True
            self.logonRejectedReason = "No response received in %s" % self.LOGIN_TIMEOUT_SECS
Exemplo n.º 5
0
 def __init__(self, config, msgFile=None):
     GatewaySession.__init__(self, config, msgFile=msgFile)
     self.loggedIn = False
     self.logonRejected = False
     self.logonRejectedReason = ""
     self.rate = None 
Exemplo n.º 6
0
 def __init__(self, config, msgFile=None):
     GatewaySession.__init__(self, config, msgFile=msgFile)
     self.loggedIn = False
     self.logonRejected = False
     self.logonRejectedReason = ""
     self.rate = None