Anklang C++ API 0.0.0
Loading...
Searching...
No Matches
WebSocketConnectionabstract

#include "websocket.hh"

Inheritance diagram for WebSocketConnection:
[legend]

Classes

struct Info
struct Internals

Public Member Functions

virtual boolauthenticated (const std::string &token)
virtual voidclosed ()
virtual voidfailed ()
virtual voidhttp_request ()
boolis_open () const
virtual voidlog (const String &message)
voidlog_status (int status, const String &filepath="")
virtual voidmessage (const String &message)
Stringnickname ()
virtual voidopened ()
boolsend_binary (const String &blob)
boolsend_text (const String &message)
virtual intvalidate ()

Protected Member Functions

Infoget_info ()
WebSocketConnection (Internals &internals, int logflags)
virtual~WebSocketConnection ()=0

Protected Attributes

const intlogflags_

Constructor & Destructor Documentation

~WebSocketConnection()

~WebSocketConnection ( )
protectedpure virtual

WebSocketConnection()

WebSocketConnection ( Internals & internals,
int logflags
)
explicitprotected

Member Function Documentation

get_info()

WebSocketConnection::Info get_info ( )
protected

is_open()

bool is_open ( ) const

nickname()

String nickname ( )

log_status()

void log_status ( int status,
const String & filepath = ""
)

http_request()

void http_request ( )
virtual

Independent of socket ops.

authenticated()

bool authenticated ( const std::string & token)
virtual

Return true to allow validate().

validate()

int validate ( )
virtual

Return true to allow opened().

failed()

void failed ( )
virtual

Never folloed by opened().

opened()

void opened ( )
virtual

Pairs with closed().

message()

void message ( const String & message)
virtual

Only if opened.

closed()

void closed ( )
virtual

Pairs with opened().

log()

void log ( const String & message)
virtual

send_text()

bool send_text ( const String & message)

Returns true if text message was sent.

send_binary()

bool send_binary ( const String & blob)

Returns true if binary blob was sent.

Member Data Documentation

logflags_

const int logflags_
protected