![]() |
Kurlyk
|
Holds information for sending a WebSocket message, including rate limiting, close status, and a callback. More...
#include <WebSocketSendInfo.hpp>
Public Member Functions | |
WebSocketSendInfo (std::string message, long rate_limit_id=0, bool is_send_close=false, int status=1000, std::function< void(const std::error_code &)> callback=nullptr) | |
Constructs a WebSocketSendInfo instance with the specified parameters. | |
Public Attributes | |
std::string | message |
Content of the WebSocket message to be sent. | |
long | rate_limit_id = 0 |
Rate limit ID applied to the message. A value of 0 implies the default rate limit or no limit if unspecified. | |
bool | is_send_close = false |
Indicates if this message is a close request. | |
int | status = 1000 |
Status code for the close request, default is normal closure (1000). | |
std::function< void(const std::error_code &)> | callback |
Callback invoked after sending, with error status. | |
Holds information for sending a WebSocket message, including rate limiting, close status, and a callback.
Definition at line 12 of file WebSocketSendInfo.hpp.
|
inline |
Constructs a WebSocketSendInfo instance with the specified parameters.
message | Content of the WebSocket message to be sent. |
rate_limit_id | ID for rate limiting the message. A value of 0 applies the default rate limit, or no limit if unspecified. |
is_send_close | True if the message is a close request, false otherwise. |
status | Status code for the close request; default is 1000 (normal closure). |
callback | Callback function to be called upon completion of the send operation. |
Definition at line 26 of file WebSocketSendInfo.hpp.
std::function<void(const std::error_code&)> kurlyk::WebSocketSendInfo::callback |
Callback invoked after sending, with error status.
Definition at line 18 of file WebSocketSendInfo.hpp.
bool kurlyk::WebSocketSendInfo::is_send_close = false |
Indicates if this message is a close request.
Definition at line 16 of file WebSocketSendInfo.hpp.
std::string kurlyk::WebSocketSendInfo::message |
Content of the WebSocket message to be sent.
Definition at line 14 of file WebSocketSendInfo.hpp.
long kurlyk::WebSocketSendInfo::rate_limit_id = 0 |
Rate limit ID applied to the message. A value of 0 implies the default rate limit or no limit if unspecified.
Definition at line 15 of file WebSocketSendInfo.hpp.
int kurlyk::WebSocketSendInfo::status = 1000 |
Status code for the close request, default is normal closure (1000).
Definition at line 17 of file WebSocketSendInfo.hpp.