class documentation

class TCPServer(object):

Constructor: TCPServer(inbound_handler, port)

View In Hierarchy

Simple server that accepts inbound TCP/IP connections and hands them off to a handler function. TCPServer obeys the ROS_IP/ROS_HOSTNAME environment variables

Method __init__ Setup a server socket listening on the specified port. If the port is omitted, will choose any open port. @param inbound_handler: handler to invoke with new connection @type inbound_handler: fn(sock, addr) @param port: port to bind to, omit/0 to bind to any @type port: int...
Method get_full_addr @return: (ip address, port) of server socket binding @rtype: (str, int)
Method run Main TCP receive loop. Should be run in a separate thread -- use start() to do this automatically.
Method shutdown shutdown I/O resources uses by this server
Method start Runs the run() loop in a separate thread
Instance Variable addr Undocumented
Instance Variable inbound_handler Undocumented
Instance Variable is_shutdown Undocumented
Instance Variable port Undocumented
Instance Variable server_sock Undocumented
Method _create_server_sock binds the server socket. ROS_IP/ROS_HOSTNAME may restrict binding to loopback interface.
def __init__(self, inbound_handler, port=0):

Setup a server socket listening on the specified port. If the port is omitted, will choose any open port. @param inbound_handler: handler to invoke with new connection @type inbound_handler: fn(sock, addr) @param port: port to bind to, omit/0 to bind to any @type port: int

def get_full_addr(self):

@return: (ip address, port) of server socket binding @rtype: (str, int)

def run(self):

Main TCP receive loop. Should be run in a separate thread -- use start() to do this automatically.

def shutdown(self):

shutdown I/O resources uses by this server

def start(self):

Runs the run() loop in a separate thread

addr =

Undocumented

inbound_handler =

Undocumented

is_shutdown: bool =

Undocumented

port =

Undocumented

server_sock =

Undocumented

def _create_server_sock(self):

binds the server socket. ROS_IP/ROS_HOSTNAME may restrict binding to loopback interface.