Provides methods for creating, manipulating, searching, and sorting arrays.
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Provides a re-entrant mutual exclusion primitive for thread synchronization.
Provides an RAII-style scoped lock wrapper around synchronization primitives.
Provides the underlying stream of data for network access.
Base object class for DotNetDupe mirroring .NET System.Object.
Provides reference-counted and weak pointer memory management primitives ensuring zero raw ownership.
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
void Close()
Transmits an RFC 6455 close frame (opcode 0x8) and marks the state as Closed.
bool SendBytes(const Array< uint8_t > &data)
Sends a complete binary message frame (opcode 0x2) to the remote peer.
bool SendAsync(const String &message)
Sends a complete UTF-8 text message frame (opcode 0x1) to the remote peer.
WebSocketState GetState() const
Gets the current operational state of the WebSocket.
static String ComputeSecWebSocketAccept(const String &secWebSocketKey)
Computes the RFC 6455 Sec-WebSocket-Accept handshake header from a client challenge key.
bool ReceiveText(String &outMessage)
Receives and decodes the next complete text message frame from the stream.
void SetState(WebSocketState state)
Sets the operational state of the WebSocket.
WebSocket(SmartPointer< Sockets::NetworkStream > pStream)
Constructs a WebSocket instance bound to the specified open network stream.
Supports all classes in the DotNetDupe class hierarchy.
A unified smart pointer that supports both unique and shared ownership semantics.
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
WebSocketState
Defines the operational states that a WebSocket connection can be in.
@ Closed
The connection has cleanly closed.
@ CloseSent
A close control frame was transmitted.
@ Aborted
The connection was aborted or closed abruptly.
@ Open
The connection is open and ready for sending/receiving frames.
@ Connecting
The connection is negotiating the handshake.
@ CloseReceived
A close control frame was received from the remote peer.