This repository has been archived on 2024-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
RLogs/src/connection.h
2022-11-07 21:52:11 +03:00

28 lines
700 B
C++
Executable File

//
// Created by Ilya on 16.10.2022.
//
#ifndef UNTITLED_CONNECTION_H
#define UNTITLED_CONNECTION_H
#include "string"
#include <websocketpp/client.hpp>
#include <websocketpp/config/asio_client.hpp>
#include <nlohmann/json.hpp>
typedef websocketpp::client<websocketpp::config::asio_tls_client> client;
typedef websocketpp::lib::shared_ptr<boost::asio::ssl::context> context_ptr;
class connection {
private:
std::string session;
client ws;
public:
explicit connection(std::string session);
void on_message(websocketpp::connection_hdl, client::message_ptr msg);
context_ptr on_tls_init(websocketpp::connection_hdl);
};
#endif //UNTITLED_CONNECTION_H