Provides a way of specifying network transport hints to ros::NodeHandle::subscribe() and someday ros::NodeHandle::advertise() More...
#include <transport_hints.h>
Public Member Functions | |
int | getMaxDatagramSize () |
Returns the maximum datagram size specified on this TransportHints, or 0 if no size was specified. More... | |
const M_string & | getOptions () |
Returns the map of options created by other methods inside TransportHints. More... | |
bool | getTCPNoDelay () |
Returns whether or not this TransportHints has specified TCP_NODELAY. More... | |
const V_string & | getTransports () |
Returns a vector of transports, ordered by preference. More... | |
TransportHints & | maxDatagramSize (int size) |
If a UDP transport is used, specifies the maximum datagram size. More... | |
TransportHints & | reliable () |
Specifies a reliable transport. Currently this means TCP. More... | |
TransportHints & | tcp () |
Explicitly specifies the TCP transport. More... | |
TransportHints & | tcpNoDelay (bool nodelay=true) |
If a TCP transport is used, specifies whether or not to use TCP_NODELAY to provide a potentially lower-latency connection. More... | |
TransportHints & | udp () |
Explicitly specifies a UDP transport. More... | |
TransportHints & | unreliable () |
Specifies an unreliable transport. Currently this means UDP. More... | |
Private Attributes | |
M_string | options_ |
V_string | transports_ |
Provides a way of specifying network transport hints to ros::NodeHandle::subscribe() and someday ros::NodeHandle::advertise()
Uses the named parameter idiom, allowing you to do things like:
ros::TransportHints() .unreliable() .maxDatagramSize(1000) .tcpNoDelay();
Hints for the transport type are used in the order they are specified, i.e. TransportHints().unreliable().reliable() specifies that you would prefer an unreliable transport, followed by a reliable one.
Definition at line 54 of file transport_hints.h.
|
inline |
Returns the maximum datagram size specified on this TransportHints, or 0 if no size was specified.
Definition at line 123 of file transport_hints.h.
|
inline |
Returns the map of options created by other methods inside TransportHints.
Definition at line 160 of file transport_hints.h.
|
inline |
Returns whether or not this TransportHints has specified TCP_NODELAY.
Definition at line 91 of file transport_hints.h.
|
inline |
Returns a vector of transports, ordered by preference.
Definition at line 156 of file transport_hints.h.
|
inline |
If a UDP transport is used, specifies the maximum datagram size.
size | The size, in bytes |
Definition at line 113 of file transport_hints.h.
|
inline |
Specifies a reliable transport. Currently this means TCP.
Definition at line 60 of file transport_hints.h.
|
inline |
Explicitly specifies the TCP transport.
Definition at line 70 of file transport_hints.h.
|
inline |
If a TCP transport is used, specifies whether or not to use TCP_NODELAY to provide a potentially lower-latency connection.
nodelay | [optional] Whether or not to use TCP_NODELAY. Defaults to true. |
Definition at line 82 of file transport_hints.h.
|
inline |
Explicitly specifies a UDP transport.
Definition at line 147 of file transport_hints.h.
|
inline |
Specifies an unreliable transport. Currently this means UDP.
Definition at line 137 of file transport_hints.h.
|
private |
Definition at line 164 of file transport_hints.h.
|
private |
Definition at line 163 of file transport_hints.h.