Virtufin WebSocket Manager API Documentation
Auto-generated from XML documentation comments.
HTTP API
WebSocketController
Provides HTTP endpoints for managing external WebSocket connections.
Connect
Establishes a new WebSocket connection.
Parameters:
- request: The connection request containing the WebSocket URL.
Returns: The connection ID and status on success.
Disconnect
Disconnects and removes a WebSocket connection.
Parameters:
- id: The ID of the connection to disconnect.
Returns: Success status.
List
Lists all managed WebSocket connections.
Returns: A list of all WebSocket connections.
Send
Sends a message and waits for a correlated response.
Parameters:
- id: The ID of the connection.
- request: The message request.
Returns: The response from the WebSocket server.
SendRaw
Sends a message without waiting for a response.
Parameters:
- id: The ID of the connection.
- request: The message request.
Returns: Success status.
StartPublish
Starts publishing WebSocket messages to a Dapr pub/sub topic.
Parameters:
- id: The ID of the connection.
- request: The request containing the topic name.
Returns: Success status.
StopPublish
Stops publishing WebSocket messages to the Dapr pub/sub topic.
Parameters:
- id: The ID of the connection.
Returns: Success status.
gRPC API
ServiceRegistryService
gRPC service for managing external WebSocket connections.
All gRPC methods mirror the HTTP API endpoints.
Data Models
Virtufin.WebSocketManager.Controllers.WebSocketController
Provides HTTP endpoints for managing external WebSocket connections.
Virtufin.WebSocketManager.Models.ConnectionStatus
Represents the current state of a WebSocket connection.
Virtufin.WebSocketManager.Models.DTOs.ConnectRequest
Request to establish a new WebSocket connection.
Virtufin.WebSocketManager.Models.DTOs.ConnectResponse
Response returned after establishing a WebSocket connection.
Virtufin.WebSocketManager.Models.DTOs.SendMessageRequest
Request to send a message and wait for a correlated response.
Virtufin.WebSocketManager.Models.DTOs.SendMessageResponse
Response containing the correlated message from the WebSocket server.
Virtufin.WebSocketManager.Models.DTOs.StartPublishRequest
Request to start publishing WebSocket messages to a Dapr pub/sub topic.
Virtufin.WebSocketManager.Models.DTOs.WebSocketListItem
Represents a WebSocket connection in a list response.
Virtufin.WebSocketManager.Models.WebSocketConnection
Represents a managed external WebSocket connection.
Virtufin.WebSocketManager.Protos.ServiceRegistry.ServiceRegistryBase
Base class for server-side implementations of ServiceRegistry
Virtufin.WebSocketManager.Protos.ServiceRegistryReflection
Holder for reflection information generated from Protos/service_registry.proto
Virtufin.WebSocketManager.Protos.ServiceRegistryService
gRPC service for managing external WebSocket connections.
Virtufin.WebSocketManager.Services.DaprConnectionRepository
Implementation of IDaprConnectionRepository using Dapr state store.
Virtufin.WebSocketManager.Services.DaprPublisher
Implementation of IDaprPublisher that uses the Dapr client to publish events.
Virtufin.WebSocketManager.Services.DaprStateStoreEntry
Represents a WebSocket connection entry stored in Dapr state store.
Virtufin.WebSocketManager.Services.DefaultInstanceIdProvider
Default implementation of IInstanceIdProvider that uses the machine name.
Virtufin.WebSocketManager.Services.DistributedWebSocketConnectionStore
Distributed implementation of IWebSocketConnectionStore using Dapr state store.
Virtufin.WebSocketManager.Services.IDaprConnectionRepository
Repository for persisting WebSocket connections to Dapr state store.
Virtufin.WebSocketManager.Services.IDaprPublisher
Publishes messages to Dapr pub/sub topics.
Virtufin.WebSocketManager.Services.IInstanceIdProvider
Provides the unique identifier for this service instance.
Virtufin.WebSocketManager.Services.IWebSocketClientWrapper
Provides operations for managing external WebSocket connections.
Virtufin.WebSocketManager.Services.IWebSocketConnectionStore
Stores and manages WebSocket connections.
Virtufin.WebSocketManager.Services.WebSocketClientWrapper
Implementation of IWebSocketClientWrapper that manages external WebSocket connections.
Virtufin.WebSocketManager.Services.WebSocketConnectionStore
In-memory implementation of IWebSocketConnectionStore.
Properties
DTOs and Models
- AutoReconnect: Gets or sets whether the connection should automatically reconnect on failure.
- Url: Gets or sets the WebSocket server URL to connect to.
- Id: Gets or sets the unique identifier for the established connection.
- Status: Gets or sets the current status of the connection.
- Message: Gets or sets the message payload to send.
- TimeoutMs: Gets or sets the timeout in milliseconds to wait for a response.
- Response: Gets or sets the response payload from the WebSocket server.
- Topic: Gets or sets the Dapr pub/sub topic name to publish messages to.
- Id: Gets or sets the unique identifier for this connection.
- InstanceId: Gets or sets the instance ID that owns this connection.
- Status: Gets or sets the current connection status.
- Topic: Gets or sets the Dapr pub/sub topic for publishing messages.
- Url: Gets or sets the WebSocket server URL.
- AutoReconnect: Gets or sets whether the connection should automatically reconnect on failure.
- CancellationTokenSource: Gets or sets the cancellation token source for the receive loop.
- CreatedAt: Gets or sets when this connection was created.
- Id: Gets or sets the unique identifier for this connection.
- InstanceId: Gets or sets the instance ID that owns this connection.
- ReceiveTask: Gets or sets the background task running the receive loop.
- Status: Gets or sets the current connection status.
- Topic: Gets or sets the Dapr pub/sub topic for publishing messages.
- Url: Gets or sets the WebSocket server URL.
- WebSocket: Gets or sets the underlying ClientWebSocket instance.