|
steam-min-cpp
|
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. | |
| void | set_on_disconnect (std::function< void(const std::string &)> handler) override |
| Public Member Functions inherited from Steam::Networking::IConnection | |
| bool | is_connected () const |
| Check whether the transport is connected. | |
| virtual void | set_on_disconnect (std::function< void(const std::string &reason)> handler)=0 |
| Register a disconect handler. | |
|
overridevirtual |
Send a raw message frame.
| data | Serialized packet payload to transmit. |
Implements Steam::Networking::IConnection.
|
overridevirtual |
Close the active connection.
Implementations should terminate the transport and release any associated resources.
Implements Steam::Networking::IConnection.
|
overridevirtual |
Initiate the network connection.
Implementations should begin establishing the underlying transport connection.
Implements Steam::Networking::IConnection.
|
inlineoverridevirtual |
Register a frame receive handler.
The handler is invoked whenever a full message frame is received from the transport.
| handler | Callback receiving the raw frame bytes. |
Implements Steam::Networking::IConnection.
|
inlineoverridevirtual |
Retrieve the current connection state.
Implements Steam::Networking::IConnection.