def send_hello(self, url): hello = ua.Hello() hello.EndpointUrl = url future = Future() with self._lock: self._callbackmap[0] = future binmsg = self._connection.tcp_to_binary(ua.MessageType.Hello, hello) self._socket.write(binmsg) ack = future.result(self.timeout) return ack
def send_hello(self, url, max_messagesize=0, max_chunkcount=0): hello = ua.Hello() hello.EndpointUrl = url hello.MaxMessageSize = max_messagesize hello.MaxChunkCount = max_chunkcount future = Future() with self._lock: self._callbackmap[0] = future binmsg = uatcp_to_binary(ua.MessageType.Hello, hello) self._socket.write(binmsg) ack = future.result(self.timeout) return ack