packio
Public Member Functions | List of all members
packio::extra::websocket_acceptor_adapter< Acceptor, WebsocketAdapter > Class Template Reference

Adapter class to support websockets servers. More...

#include <packio/extra/websocket.h>

Public Member Functions

WebsocketAdapter accept ()
 Don't need definition, but declaration is used to determine the socket type.
 
template<typename Handler >
void async_accept (Handler &&handler)
 Accept the low level connection and configure the recommended timeout settings. More...
 

Detailed Description

template<typename Acceptor, typename WebsocketAdapter>
class packio::extra::websocket_acceptor_adapter< Acceptor, WebsocketAdapter >

Adapter class to support websockets servers.

Template Parameters
AcceptorThe low level acceptor. Most likely a boost::asio::ip::tcp::acceptor
WebsocketAdapterThe websocket type to use. Most likely a websocket_adapter

Member Function Documentation

◆ async_accept()

template<typename Acceptor , typename WebsocketAdapter >
template<typename Handler >
void packio::extra::websocket_acceptor_adapter< Acceptor, WebsocketAdapter >::async_accept ( Handler &&  handler)
inline

Accept the low level connection and configure the recommended timeout settings.

If you need to configure the websocket differently, you can either write your own adapter, of change the session socket options in async_serve


The documentation for this class was generated from the following file: