class documentation
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 |
@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 |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | port |
Undocumented |
Instance Variable | server |
Undocumented |
Method | _create |
binds the server socket. ROS_IP/ROS_HOSTNAME may restrict binding to loopback interface. |
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