bearer.py 840 B

123456789101112131415161718192021222324252627282930
  1. import socket
  2. import time
  3. import threading
  4. import config as cfg
  5. from connection.socket import SocketClient
  6. class Bearer():
  7. def __init__(self, parser):
  8. self.parser = parser
  9. self.connector = None
  10. self.data = None
  11. print("\n\n Bearer, \n ")
  12. def oracleInitial(self,data):
  13. try:
  14. time.sleep(3)
  15. self.connector = SocketClient(data["connector"][0],data["connector"][1],self.parser,"Bearer")
  16. self.data = data["data"]
  17. except Exception as exception :
  18. print("\33[41mAn exception occurred oracleInitial Bearer " ,exception,"\33[0m" )
  19. def MPC(self,data):
  20. try:
  21. print("TODO") # TODO
  22. except Exception as exception :
  23. print("\33[41mAn exception occurred MPC Bearer " ,exception,"\33[0m" )