steam-min-cpp
Loading...
Searching...
No Matches
Steam::Networking::TCPConnection Class Reference
Inheritance diagram for Steam::Networking::TCPConnection:

Public Member Functions

 TCPConnection (boost::asio::io_context &ctx)
ConnectionState state () const override
 Retrieve the current connection state.
void network_connect () override
 Initiate the network connection.
void network_close () override
 Close the active connection.
void async_send (const std::vector< uint8_t > &data) override
 Send a raw message frame.
void set_on_frame (std::function< void(std::vector< uint8_t >)> handler) override
 Register a frame receive handler.
Public Member Functions inherited from Steam::Networking::IConnection
bool is_connected () const
 Check whether the transport is connected.

Member Function Documentation

◆ async_send()

void Steam::Networking::TCPConnection::async_send ( const std::vector< uint8_t > & data)
overridevirtual

Send a raw message frame.

Parameters
dataSerialized packet payload to transmit.

Implements Steam::Networking::IConnection.

◆ network_close()

void Steam::Networking::TCPConnection::network_close ( )
overridevirtual

Close the active connection.

Implementations should terminate the transport and release any associated resources.

Implements Steam::Networking::IConnection.

◆ network_connect()

void Steam::Networking::TCPConnection::network_connect ( )
overridevirtual

Initiate the network connection.

Implementations should begin establishing the underlying transport connection.

Implements Steam::Networking::IConnection.

◆ set_on_frame()

void Steam::Networking::TCPConnection::set_on_frame ( std::function< void(std::vector< uint8_t >)> handler)
inlineoverridevirtual

Register a frame receive handler.

The handler is invoked whenever a full message frame is received from the transport.

Parameters
handlerCallback receiving the raw frame bytes.

Implements Steam::Networking::IConnection.

◆ state()

ConnectionState Steam::Networking::TCPConnection::state ( ) const
inlineoverridevirtual

Retrieve the current connection state.

Implements Steam::Networking::IConnection.


The documentation for this class was generated from the following file:
  • include/steamclient/connections/tcp.hpp