DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
WebSocketContext.h
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "Common.h"
7#include "System/Object.h"
8#include "System/String.h"
10#include "System/Action.h"
13
14namespace DotNetDupe {
15 namespace WebAppCore {
79 }
80}
Encapsulates a delegate method that has parameters and returns void.
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition Common.h:20
HTTP request, response, and context abstractions for WebAppCore processing pipelines.
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.
Represents an RFC 6455 full-duplex WebSocket connection over a NetworkStream.
Supports all classes in the DotNetDupe class hierarchy.
Definition Object.h:18
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.
Definition String.h:74
Interface for receiving WebSocket connection lifecycle events and incoming messages.
virtual void OnMessage(DotNetDupe::System::SmartPointer< WebSocketContext > pContext, const DotNetDupe::System::String &message)=0
Invoked when a complete text message frame is received from the remote client.
virtual void OnDisconnected(DotNetDupe::System::SmartPointer< WebSocketContext > pContext)=0
Invoked when the WebSocket connection is closed or the remote peer disconnects.
~IWebSocketHandler() override=default
Virtual destructor.
virtual void OnConnected(DotNetDupe::System::SmartPointer< WebSocketContext > pContext)=0
Invoked immediately after a successful RFC 6455 WebSocket handshake.
DotNetDupe::System::SmartPointer< DotNetDupe::System::Net::WebSockets::WebSocket > GetWebSocket() const
Gets the active bidirectional WebSocket connection.
DotNetDupe::System::SmartPointer< Http::HttpContext > GetHttpContext() const
Gets the originating HTTP upgrade context.
~WebSocketContext() override=default
Virtual destructor.
WebSocketContext(DotNetDupe::System::SmartPointer< Http::HttpContext > pContext, DotNetDupe::System::SmartPointer< DotNetDupe::System::Net::WebSockets::WebSocket > pWebSocket)
Constructs a WebSocketContext wrapping the originating HttpContext and active WebSocket.