NAP
websocketutils.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 
5 #pragma once
6 
7 // External Includes
8 #include <utility/dllexport.h>
9 #include <nap/numeric.h>
10 
11 namespace nap
12 {
18  {
19  None = 0x0,
20  Debug = 0x1,
21  Library = 0x2,
22  Info = 0x4,
23  Warning = 0x8,
24  Error = 0x10,
25  Fatal = 0x20,
26  All = 0xffffffff
27  };
28 
29  enum class EWebSocketOPCode : uint32
30  {
31  Continuation = 0x0,
32  Text = 0x1,
33  Binary = 0x2,
34  RSV3 = 0x3,
35  RSV4 = 0x4,
36  RSV5 = 0x5,
37  RSV6 = 0x6,
38  RSV7 = 0x7,
39  Close = 0x8,
40  Ping = 0x9,
41  Pong = 0xA,
42  ControlRSVB = 0xB,
43  ControlRSVC = 0xC,
44  ControlRSVD = 0xD,
45  ControlRSVE = 0xE,
46  ControlRSVF = 0xF
47  };
48 
56 }
nap::EWebSocketOPCode::RSV4
@ RSV4
nap::EWebSocketLogLevel::Fatal
@ Fatal
Unrecoverable error. Will cause endpoint to be terminated unclean.
nap::EWebSocketOPCode::ControlRSVB
@ ControlRSVB
nap::EWebSocketOPCode::RSV3
@ RSV3
nap::EWebSocketOPCode::ControlRSVD
@ ControlRSVD
nap::EWebSocketOPCode::Text
@ Text
nap::EWebSocketOPCode::Ping
@ Ping
nap::EWebSocketLogLevel::Error
@ Error
Recoverable error. Solution might be closing the connection with an appropiate error code.
nap::EWebSocketLogLevel::Warning
@ Warning
Information about important problems not severe enough to close connection.
nap::EWebSocketLogLevel::Info
@ Info
Minor configuration problems or additional warning information.
nap::EWebSocketOPCode::Pong
@ Pong
nap::EWebSocketLogLevel::None
@ None
Log nothing.
nap::uint32
uint32_t uint32
Definition: numeric.h:20
nap::computeWebSocketLogLevel
NAPAPI uint32 computeWebSocketLogLevel(EWebSocketLogLevel level)
nap::EWebSocketOPCode::Close
@ Close
nap::EWebSocketOPCode::Continuation
@ Continuation
nap::EWebSocketOPCode::ControlRSVC
@ ControlRSVC
nap::EWebSocketLogLevel::Debug
@ Debug
Low level debugging information.
nap::EWebSocketOPCode::ControlRSVE
@ ControlRSVE
nap::EWebSocketOPCode::RSV7
@ RSV7
nap::EWebSocketOPCode::RSV5
@ RSV5
nap
Definition: templateapp.h:17
nap::EWebSocketOPCode::ControlRSVF
@ ControlRSVF
nap::EWebSocketLogLevel::All
@ All
Log all levels.
nap::EWebSocketOPCode::RSV6
@ RSV6
nap::EWebSocketOPCode
EWebSocketOPCode
Definition: websocketutils.h:29
nap::EWebSocketOPCode::Binary
@ Binary
nap::EWebSocketLogLevel::Library
@ Library
Usual system states or small internal library problems.
nap::EWebSocketLogLevel
EWebSocketLogLevel
Definition: websocketutils.h:17