async 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 ack = asyncio.Future() self._callbackmap[0] = ack self.transport.write(uatcp_to_binary(ua.MessageType.Hello, hello)) return await asyncio.wait_for(ack, self.timeout)
async 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 = asyncio.Future() self._callbackmap[0] = future binmsg = uatcp_to_binary(ua.MessageType.Hello, hello) self.transport.write(binmsg) await asyncio.wait_for(future, self.timeout) ack = future.result() return ack