NAP
wspp.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 
5 #pragma once
6 
7 #include <websocketpp/server.hpp>
8 #include <websocketpp/client.hpp>
9 #include <websocketpp/config/asio.hpp>
10 
11 namespace nap
12 {
13  // Wrapping often used web-socket library types
14  namespace wspp
15  {
16  using ConfigTLS = websocketpp::config::asio_tls;
17  using Config = websocketpp::config::asio;
18  using ConnectionHandle = std::weak_ptr<void>;
19  using MessagePtr = Config::message_type::ptr;
20  using OpCode = websocketpp::frame::opcode::value;
21  using ServerEndPoint = websocketpp::server<Config>;
22  using ServerEndPointTLS = websocketpp::server<ConfigTLS>;
23  }
24 }
nap::wspp::OpCode
websocketpp::frame::opcode::value OpCode
web-socket op codes
Definition: wspp.h:20
nap::wspp::ServerEndPointTLS
websocketpp::server< ConfigTLS > ServerEndPointTLS
Web socket server end point with TLS support.
Definition: wspp.h:22
nap::wspp::Config
websocketpp::config::asio Config
web-socket low level config
Definition: wspp.h:17
nap::wspp::ConnectionHandle
std::weak_ptr< void > ConnectionHandle
server / client connection
Definition: wspp.h:18
nap::wspp::ConfigTLS
websocketpp::config::asio_tls ConfigTLS
web-socket low level config, with TLS support
Definition: wspp.h:16
nap::wspp::MessagePtr
Config::message_type::ptr MessagePtr
internal message format
Definition: wspp.h:19
nap::wspp::ServerEndPoint
websocketpp::server< Config > ServerEndPoint
Web socket server end point.
Definition: wspp.h:21
nap
Definition: templateapp.h:17