Program Listing for File WsppApiServer.h

Return to documentation for file (axr.sdk/net/WsppApiServer.h)

// Copyright (C) AcceleratXR, Inc. All rights reserved.
//
// Author: Jean-Philippe Steinmetz <info@acceleratxr.com>
#pragma once

#include "./AbstractApiServer.h"
#include <websocketpp/config/asio_no_tls.hpp>
#include <websocketpp/server.hpp>

namespace axr {
namespace sdk {
namespace net {

typedef websocketpp::server<websocketpp::config::asio> WsppServer;

class WsppApiServer : public AbstractApiServer
{
public:
    WsppApiServer(std::shared_ptr<Configuration> Config);

    virtual pplx::task<void> Listen(uint16_t Port);

    virtual pplx::task<void> Stop();

protected:
    WsppServer m_Server;
};

} // namespace net
} // namespace sdk
} // namespace axr