Skip to content

Class nebula::drivers::connections::TcpSocket::Builder

ClassList > nebula > drivers > connections > TcpSocket > Builder

  • #include <tcp.hpp>

Public Functions

Type Name
Builder (const std::string & target_ip, uint16_t target_port)
Build a TCP socket.
Builder (const Endpoint & target)
TcpSocket connect ()
Connect the socket to the target IP and port.
Builder && set_buffer_size (size_t bytes)
Set the internal buffer size for receiving data.
Builder && set_connect_timeout (int32_t timeout_ms)
Set the timeout duration for the initial TCP connect attempt.
Builder && set_polling_interval (int32_t interval_ms)
Set the interval at which the socket polls for new data.
Builder && set_socket_buffer_size (size_t bytes)
Set the internal socket receive buffer size.

Public Functions Documentation

function Builder [1/2]

Build a TCP socket.

inline nebula::drivers::connections::TcpSocket::Builder::Builder (
    const std::string & target_ip,
    uint16_t target_port
) 

Parameters:

  • target_ip The address to connect to.
  • target_port The port to connect to.

function Builder [2/2]

inline explicit nebula::drivers::connections::TcpSocket::Builder::Builder (
    const Endpoint & target
) 

function connect

Connect the socket to the target IP and port.

inline TcpSocket nebula::drivers::connections::TcpSocket::Builder::connect () 


function set_buffer_size

Set the internal buffer size for receiving data.

inline Builder && nebula::drivers::connections::TcpSocket::Builder::set_buffer_size (
    size_t bytes
) 

Parameters:

  • bytes The desired buffer size in bytes.

function set_connect_timeout

Set the timeout duration for the initial TCP connect attempt.

inline Builder && nebula::drivers::connections::TcpSocket::Builder::set_connect_timeout (
    int32_t timeout_ms
) 

Parameters:

  • timeout_ms The desired connection timeout in milliseconds.

function set_polling_interval

Set the interval at which the socket polls for new data.

inline Builder && nebula::drivers::connections::TcpSocket::Builder::set_polling_interval (
    int32_t interval_ms
) 

Parameters:

  • interval_ms The desired polling interval.

function set_socket_buffer_size

Set the internal socket receive buffer size.

inline Builder && nebula::drivers::connections::TcpSocket::Builder::set_socket_buffer_size (
    size_t bytes
) 

Parameters:

  • bytes The desired buffer size in bytes.


The documentation for this class was generated from the following file src/nebula_core/nebula_core_hw_interfaces/include/nebula_core_hw_interfaces/nebula_hw_interfaces_common/connections/tcp.hpp