Anklang C++ API 0.0.0
Loading...
Searching...
No Matches
WebSocketServerImpl
Inheritance diagram for WebSocketServerImpl:
[legend]

Public Types

usingConVec = std::vector< WebSocketConnectionP >
usingRegexVector = std::vector< std::regex >
- Public Types inherited from WebSocketServer
usingMakeConnection = std::function< WebSocketConnectionP(WebSocketConnection::Internals &, int)>
usingUnlistenCB = std::function< void()>

Public Member Functions

WebSocketConnection *force_con (WppHdl)
voidhttp_alias (const String &webdir, const String &path) override
voidhttp_dir (const String &path) override
voidlisten (const String &host, int port, const UnlistenCB &ulcb) override
WebSocketConnectionPmake_connection (WppHdl hdl)
Stringmap_url (const String &urlpath) override
voidreset () override
voidrun ()
voidsetup (const String &host, int port)
voidshutdown () override
Stringurl () const override
WebSocketServerImpl (const MakeConnection &make_con, int logflags)
WppConnectionPwppconp (WppHdl hdl)
voidws_closed (WebSocketConnectionP)
voidws_opened (WebSocketConnectionP)

Public Attributes

std::vector< std::pair< String, String > >aliases_
Stringdir_
RegexVectorignores_
std::thread *initialized_thread_
intlogflags_
MakeConnectionmake_con_
ConVecopencons_
Stringserver_url_
WppServerwppserver_

Additional Inherited Members

- Static Public Member Functions inherited from WebSocketServer
static WebSocketServerPcreate (const MakeConnection &make, int logflags=0)
static Stringmime_type (const String &ext, bool utf8)
static Stringuser_agent ()
static boolutf8_validate (const std::string &utf8string)
- Protected Member Functions inherited from WebSocketServer
virtual~WebSocketServer ()
- Static Protected Member Functions inherited from WebSocketServer
static WebSocketConnection::Internals &internals (WebSocketConnection &c)

Member Typedef Documentation

ConVec

using ConVec = std::vector<WebSocketConnectionP>

RegexVector

using RegexVector = std::vector<std::regex>

Constructor & Destructor Documentation

WebSocketServerImpl()

WebSocketServerImpl ( const MakeConnection & make_con,
int logflags
)

Member Function Documentation

setup()

void setup ( const String & host,
int port
)

run()

void run ( )

make_connection()

WebSocketConnectionP make_connection ( WppHdl hdl)

force_con()

WebSocketConnection * force_con ( WppHdl )

url()

String url ( ) const
overridevirtual

Implements WebSocketServer.

wppconp()

WppConnectionP wppconp ( WppHdl hdl)

http_dir()

void http_dir ( const String & path)
overridevirtual

Implements WebSocketServer.

http_alias()

void http_alias ( const String & webdir,
const String & path
)
overridevirtual

Implements WebSocketServer.

map_url()

String map_url ( const String & urlpath)
overridevirtual

Implements WebSocketServer.

listen()

void listen ( const String & host,
int port,
const UnlistenCB & ulcb
)
overridevirtual

Implements WebSocketServer.

shutdown()

void shutdown ( )
overridevirtual

Implements WebSocketServer.

ws_opened()

void ws_opened ( WebSocketConnectionP conp)

ws_closed()

void ws_closed ( WebSocketConnectionP conp)

reset()

void reset ( )
overridevirtual

Implements WebSocketServer.

Member Data Documentation

initialized_thread_

std::thread* initialized_thread_

wppserver_

WppServer wppserver_

server_url_

String server_url_

dir_

String dir_

aliases_

std::vector<std::pair<String,String> > aliases_

opencons_

ConVec opencons_

ignores_

RegexVector ignores_

make_con_

MakeConnection make_con_

logflags_

int logflags_