|
unrealcv
|
Public Member Functions | |
| def | __init__ (self, endpoint, raw_message_handler) |
| def | connect (self, timeout=1) |
| def | isconnected (self) |
| def | disconnect (self) |
| def | send (self, message) |
Public Attributes | |
| endpoint | |
| raw_message_handler | |
| socket | |
| wait_connected | |
BaseClient send message out and receiving message in a seperate thread. After calling the `send` function, only True or False will be returned to indicate whether the operation was successful. If you are trying to send a request and get a response, consider using `Client` instead. This class adds message framing on top of TCP
| def unrealcv.BaseClient.__init__ | ( | self, | |
| endpoint, | |||
| raw_message_handler | |||
| ) |
Parameters: endpoint: a tuple (ip, port) message_handler: a function defined as `def message_handler(msg)` to handle incoming message, msg is a string
| def unrealcv.BaseClient.connect | ( | self, | |
timeout = 1 |
|||
| ) |
Try to connect to server, return whether connection successful
| def unrealcv.BaseClient.send | ( | self, | |
| message | |||
| ) |
Send message out, return whether the message was successfully sent
1.8.12