mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
initial commit
This commit is contained in:
16
examples/echo_server/echo.cpp
Normal file
16
examples/echo_server/echo.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "echo.hpp"
|
||||
|
||||
using websocketecho::echo_handler;
|
||||
|
||||
bool echo_handler::validate(websocketpp::session_ptr client) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void echo_handler::message(websocketpp::session_ptr client, const std::string &msg) {
|
||||
client->send(msg);
|
||||
}
|
||||
|
||||
void echo_handler::message(websocketpp::session_ptr client,
|
||||
const std::vector<unsigned char> &data) {
|
||||
client->send(data);
|
||||
}
|
||||
Reference in New Issue
Block a user