unrealcv
Public Member Functions | Public Attributes | List of all members
unrealcv.BaseClient Class Reference
Inheritance diagram for unrealcv.BaseClient:

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
 

Detailed Description

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

Constructor & Destructor Documentation

§ __init__()

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

Member Function Documentation

§ connect()

def unrealcv.BaseClient.connect (   self,
  timeout = 1 
)
Try to connect to server, return whether connection successful

§ send()

def unrealcv.BaseClient.send (   self,
  message 
)
Send message out, return whether the message was successfully sent

The documentation for this class was generated from the following file: