DotNetDupe
4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Toggle main menu visibility
Loading...
Searching...
No Matches
WebSocketException.h
Go to the documentation of this file.
1
3
4
#pragma once
5
6
#include "
Common.h
"
7
#include "
System/String.h
"
8
#include "
System/SystemException.h
"
9
10
namespace
DotNetDupe
{
11
namespace
System
{
12
namespace
Net
{
13
namespace
WebSockets
{
14
17
enum class
WebSocketError
{
18
Success
= 0,
19
InvalidMessageType
= 1,
20
Faulted
= 2,
21
NativeError
= 3,
22
NotAWebSocket
= 4,
23
UnsupportedVersion
= 5,
24
UnsupportedProtocol
= 6,
25
HeaderError
= 7,
26
ConnectionClosedPrematurely
= 8,
27
InvalidState
= 9
28
};
29
37
class
WebSocketException
:
public
SystemException
{
38
private
:
39
WebSocketError
m_eWebSocketErrorCode;
40
int
m_iNativeErrorCode;
41
42
public
:
45
DOTNETDUPE_API
explicit
WebSocketException
(
const
String
& sMessage);
46
50
DOTNETDUPE_API
WebSocketException
(
WebSocketError
eError,
const
String
& sMessage);
51
56
DOTNETDUPE_API
WebSocketException
(
WebSocketError
eError,
int
iNativeErrorCode,
const
String
& sMessage);
57
61
DOTNETDUPE_API
WebSocketException
(
WebSocketError
eError,
const
Exception
& innerException);
62
67
DOTNETDUPE_API
WebSocketException
(
WebSocketError
eError,
const
String
& sMessage,
const
Exception
& innerException);
68
71
DOTNETDUPE_API
WebSocketError
GetWebSocketErrorCode
()
const
;
72
75
DOTNETDUPE_API
int
GetErrorCode
()
const
;
76
};
77
78
}
79
}
80
}
81
}
Common.h
Defines common cross-platform macros, export decorators, and fundamental types.
DOTNETDUPE_API
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition
Common.h:20
String.h
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
SystemException.h
Serves as the base class for system exceptions across the library.
DotNetDupe::System::Exception::Exception
Exception()
Initializes a new instance of the Exception class with a default system-supplied message.
Definition
Exception.cpp:15
DotNetDupe::System::Net::WebSockets::WebSocketException::WebSocketException
WebSocketException(const String &sMessage)
Constructs a WebSocketException with a custom descriptive error message.
Definition
WebSocketException.cpp:10
DotNetDupe::System::Net::WebSockets::WebSocketException::GetWebSocketErrorCode
WebSocketError GetWebSocketErrorCode() const
Gets the structured WebSocketError enumeration code.
Definition
WebSocketException.cpp:35
DotNetDupe::System::Net::WebSockets::WebSocketException::GetErrorCode
int GetErrorCode() const
Gets the native operating system error code associated with this exception.
Definition
WebSocketException.cpp:40
DotNetDupe::System::String
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition
String.h:74
DotNetDupe::System::SystemException::SystemException
SystemException()
Initializes a new instance of the SystemException class with a default message.
Definition
Exception.cpp:48
DotNetDupe::System::Net::WebSockets
Definition
WebSocket.h:19
DotNetDupe::System::Net::WebSockets::WebSocketError
WebSocketError
Categorizes errors that occur during WebSocket protocol handshakes, framing, or socket I/O.
Definition
WebSocketException.h:17
DotNetDupe::System::Net::WebSockets::WebSocketError::InvalidMessageType
@ InvalidMessageType
Received frame has an unknown or unexpected opcode.
Definition
WebSocketException.h:19
DotNetDupe::System::Net::WebSockets::WebSocketError::UnsupportedVersion
@ UnsupportedVersion
Requested Sec-WebSocket-Version is not supported.
Definition
WebSocketException.h:23
DotNetDupe::System::Net::WebSockets::WebSocketError::Faulted
@ Faulted
General fault occurred during processing.
Definition
WebSocketException.h:20
DotNetDupe::System::Net::WebSockets::WebSocketError::UnsupportedProtocol
@ UnsupportedProtocol
Requested subprotocol is not supported.
Definition
WebSocketException.h:24
DotNetDupe::System::Net::WebSockets::WebSocketError::Success
@ Success
No error occurred.
Definition
WebSocketException.h:18
DotNetDupe::System::Net::WebSockets::WebSocketError::NativeError
@ NativeError
Underlying socket or OS network error.
Definition
WebSocketException.h:21
DotNetDupe::System::Net::WebSockets::WebSocketError::HeaderError
@ HeaderError
Malformed WebSocket frame header or HTTP upgrade header.
Definition
WebSocketException.h:25
DotNetDupe::System::Net::WebSockets::WebSocketError::NotAWebSocket
@ NotAWebSocket
The connection or payload does not conform to RFC 6455.
Definition
WebSocketException.h:22
DotNetDupe::System::Net::WebSockets::WebSocketError::ConnectionClosedPrematurely
@ ConnectionClosedPrematurely
Connection closed before frame payload was completely read.
Definition
WebSocketException.h:26
DotNetDupe::System::Net::WebSockets::WebSocketError::InvalidState
@ InvalidState
Attempted operation on an inactive, closed, or aborted socket.
Definition
WebSocketException.h:27
DotNetDupe::System::Net
Definition
Dns.h:13
DotNetDupe::System
Definition
Action.h:11
DotNetDupe
Definition
IServiceCollection.h:7
Include
System
Net
WebSockets
WebSocketException.h
Generated by
1.18.0