NAP
Public Member Functions | Public Attributes | List of all members
WebSocketConnectionClosedEvent Class Reference

#include <websocketevent.h>

Public Member Functions

 WebSocketConnectionClosedEvent (const WebSocketConnection &connection, int errorCode, const std::string &reason)
 
 WebSocketConnectionClosedEvent (const WebSocketConnection &connection, int errorCode, std::string &&reason)
 
- Public Member Functions inherited from WebSocketConnectionEvent
 WebSocketConnectionEvent (const WebSocketConnection &connection)
 
- Public Member Functions inherited from Event
virtual ~Event ()=default
 
 Event ()=default
 
 Event (const Event &)=delete
 
Eventoperator= (const Event &)=delete
 

Public Attributes

int mErrorCode = -1
 Error code associated with reason for closing connection. More...
 
std::string mReason
 Reason for closing connection. More...
 
- Public Attributes inherited from WebSocketConnectionEvent
WebSocketConnection mConnection
 

Description

Occurs when a connection is closed. Contains the reason and exit code. Note that the connection itself is invalided when this event is received.

Inheritance diagram for WebSocketConnectionClosedEvent:
[legend]
Collaboration diagram for WebSocketConnectionClosedEvent:
[legend]

Constructor & Destructor Documentation

◆ WebSocketConnectionClosedEvent() [1/2]

WebSocketConnectionClosedEvent ( const WebSocketConnection connection,
int  errorCode,
const std::string &  reason 
)

◆ WebSocketConnectionClosedEvent() [2/2]

WebSocketConnectionClosedEvent ( const WebSocketConnection connection,
int  errorCode,
std::string &&  reason 
)

Member Data Documentation

◆ mErrorCode

int mErrorCode = -1

Error code associated with reason for closing connection.

◆ mReason

std::string mReason

Reason for closing connection.