Esempio n. 1
0
 def start(self, port=50666):
     self.context = zmq.Context()
     self.socket = self.context.socket(zmq.REP)
     self.socket.bind("tcp://*:" + str(port))
     self.session = Session()
     self.done = False
     while not self.done:
         try:
             self.loop()
         except Exception as e:
             log.critical("There exist unhandled exception!", e.args)
     self.clean()
Esempio n. 2
0
from xing.xasession import Session

session = Session()
session.login('credential.conf')

print(session.account())
print(session.heartbeat())

session.logout()
Esempio n. 3
0
 def login(self, **kwargs):
     self.session = Session()
     self.session.login(**kwargs)
     return True