parameters: (self, timer=True)
docstring: start the dispatcher thread and begin to recv msg through nng
docstring_summary: start the dispatcher thread and begin to recv msg through nng
docstring_tokens: start the dispatcher thread and begin to recv msg through nng
function: def start(self, timer=True):
          """
          start the dispatcher thread and begin to recv msg through nng
          """
          self.event_engine.start()
          print('tradeclient started ,pid = %d ' % os.getpid())
          self.__active = True
          while self.__active:
              try:
                  msgin = self._recv_sock.recv(flags=0)
                  msgin = msgin.decode("utf-8")
                  if msgin is not None and msgin.index('|') > 0:
                      if msgin[0] == '@':
                          print('tradeclient(pid = %d) rec @ msg:' %
                                (self.id), msgin, 'at ', datetime.now())
                      if msgin[-1] == '\0':
                          msgin = msgin[:-1]
                      if msgin[-1] == '\x00':
                          msgin = msgin[:-1]
                      m = Event()
                      m.deserialize(msgin)
                      self.event_engine.put(m)
              except Exception as e:
                  pass
function_tokens: def start ( self , timer = True ) : self . event_engine . start ( ) print ( 'tradeclient started ,pid = %d ' % os . getpid ( ) ) self . __active = True while self . __active : try : msgin = self . _recv_sock . recv ( flags = 0 ) msgin = msgin . decode ( "utf-8" ) if msgin is not None and msgin . index ( '|' ) > 0 : if msgin [ 0 ] == '@' : print ( 'tradeclient(pid = %d) rec @ msg:' % ( self . id ) , msgin , 'at ' , datetime . now ( ) ) if msgin [ - 1 ] == '\0' : msgin = msgin [ : - 1 ] if msgin [ - 1 ] == '\x00' : msgin = msgin [ : - 1 ] m = Event ( ) m . deserialize ( msgin ) self . event_engine . put ( m ) except Exception as e : pass