Class HttpEndpointUnixSocket
Class for dealing with custom HTTP endpoints
Implements
Inherited Members
Namespace: DuetAPIClient
Assembly: DuetAPIClient.dll
Syntax
public sealed class HttpEndpointUnixSocket : IDisposable
Constructors
HttpEndpointUnixSocket(HttpEndpointType, string, string, string, int)
Open a new UNIX socket on the given file path
Declaration
public HttpEndpointUnixSocket(HttpEndpointType endpointType, string ns, string endpointPath, string socketPath, int backlog = 4)
Parameters
Type | Name | Description |
---|---|---|
HttpEndpointType | endpointType | Type of this HTTP endpoint |
string | ns | Namespace of this HTTP endpoint |
string | endpointPath | Path of this HTTP endpoint |
string | socketPath | Path to the UNIX socket file |
int | backlog | Number of simultaneously pending connections |
Exceptions
Type | Condition |
---|---|
IOException | Socket could not be opened |
Fields
DefaultBacklog
Default number of pending connections
Declaration
public const int DefaultBacklog = 4
Field Value
Type | Description |
---|---|
int |
Properties
EndpointPath
Path of this HTTP endpoint
Declaration
public string EndpointPath { get; }
Property Value
Type | Description |
---|---|
string |
EndpointType
Type of this HTTP endpoint
Declaration
public HttpEndpointType EndpointType { get; }
Property Value
Type | Description |
---|---|
HttpEndpointType |
Namespace
Namespace of this HTTP endpoint
Declaration
public string Namespace { get; }
Property Value
Type | Description |
---|---|
string |
SocketPath
Path to the UNIX socket file
Declaration
public string SocketPath { get; }
Property Value
Type | Description |
---|---|
string |
Methods
Dispose()
Disposes all used resources
Declaration
public void Dispose()
Events
OnEndpointRequestReceived
Event that is triggered whenever a new HTTP request is received
Declaration
public event HttpEndpointUnixSocket.EndpointRequestReceived? OnEndpointRequestReceived
Event Type
Type | Description |
---|---|
HttpEndpointUnixSocket.EndpointRequestReceived |