def __init__(self, timeout=1, security_policy=ua.SecurityPolicy()): self.logger = logging.getLogger(__name__ + ".Socket") self._thread = None self._lock = Lock() self.timeout = timeout self._socket = None self._do_stop = False self.authentication_token = ua.NodeId() self._request_id = 0 self._request_handle = 0 self._callbackmap = {} self._connection = SecureConnection(security_policy)
def __init__(self, internal_server, socket): self.logger = logging.getLogger(__name__) self.iserver = internal_server self.name = socket.get_extra_info('peername') self.sockname = socket.get_extra_info('sockname') self.session = None self.socket = socket self._socketlock = Lock() self._datalock = RLock() self._publishdata_queue = [] self._publish_result_queue = [] # used when we need to wait for PublishRequest self._connection = SecureConnection(ua.SecurityPolicy())