コード例 #1
0
ファイル: ua_client.py プロジェクト: pshendre1/python-opcua
 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
コード例 #2
0
ファイル: ua_client.py プロジェクト: wereyh/python-opcua
 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