Polyphase Game Engine
Loading...
Searching...
No Matches
WebSocketTypes.h File Reference
#include <stdint.h>
#include <string>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  WsUrl
 
struct  WsConnectOptions
 
struct  WsMessage
 

Macros

#define WS_CLOSE_NORMAL   1000
 
#define WS_CLOSE_GOING_AWAY   1001
 
#define WS_CLOSE_PROTOCOL_ERROR   1002
 
#define WS_CLOSE_TOO_LARGE   1009
 
#define WS_CLOSE_ABNORMAL   1006
 
#define WS_DEFAULT_MAX_QUEUED_BYTES   (1u * 1024u * 1024u)
 
#define WS_MAX_MESSAGE_BYTES   (16u * 1024u * 1024u)
 
#define WS_RECV_CHUNK_SIZE   8192
 

Enumerations

enum class  WsState : uint8_t { Connecting = 0 , Open = 1 , Closing = 2 , Closed = 3 }
 
enum class  WsError : uint8_t {
  None = 0 , BadUrl , NoTransport , Dns ,
  Connect , Handshake , Protocol , TooLarge ,
  Transport
}
 

Functions

const char * WsErrorToString (WsError err)
 

Macro Definition Documentation

◆ WS_CLOSE_ABNORMAL

#define WS_CLOSE_ABNORMAL   1006

◆ WS_CLOSE_GOING_AWAY

#define WS_CLOSE_GOING_AWAY   1001

◆ WS_CLOSE_NORMAL

#define WS_CLOSE_NORMAL   1000

◆ WS_CLOSE_PROTOCOL_ERROR

#define WS_CLOSE_PROTOCOL_ERROR   1002

◆ WS_CLOSE_TOO_LARGE

#define WS_CLOSE_TOO_LARGE   1009

◆ WS_DEFAULT_MAX_QUEUED_BYTES

#define WS_DEFAULT_MAX_QUEUED_BYTES   (1u * 1024u * 1024u)

◆ WS_MAX_MESSAGE_BYTES

#define WS_MAX_MESSAGE_BYTES   (16u * 1024u * 1024u)

◆ WS_RECV_CHUNK_SIZE

#define WS_RECV_CHUNK_SIZE   8192

Enumeration Type Documentation

◆ WsError

enum class WsError : uint8_t
strong
Enumerator
None 
BadUrl 
NoTransport 
Dns 
Connect 
Handshake 
Protocol 
TooLarge 
Transport 

◆ WsState

enum class WsState : uint8_t
strong
Enumerator
Connecting 
Open 
Closing 
Closed 

Function Documentation

◆ WsErrorToString()

const char * WsErrorToString ( WsError  err)
inline