Class HttpEndpointUnixSocket
Class for dealing with custom HTTP endpoints
Inheritance
System.Object
HttpEndpointUnixSocket
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: DuetAPIClient
Assembly: DuetAPIClient.dll
Syntax
public sealed class HttpEndpointUnixSocket : IDisposable
Constructors
HttpEndpointUnixSocket(HttpEndpointType, String, String, String, Int32)
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 |
System.String | ns | Namespace of this HTTP endpoint |
System.String | endpointPath | Path of this HTTP endpoint |
System.String | socketPath | Path to the UNIX socket file |
System.Int32 | backlog | Number of simultaneously pending connections |
Exceptions
Type | Condition |
---|---|
System.IO.IOException | Socket could not be opened |
Fields
DefaultBacklog
Default number of pending connections
Declaration
public const int DefaultBacklog = 4
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
EndpointPath
Path of this HTTP endpoint
Declaration
public string EndpointPath { get; }
Property Value
Type | Description |
---|---|
System.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 |
---|---|
System.String |
SocketPath
Path to the UNIX socket file
Declaration
public string SocketPath { get; }
Property Value
Type | Description |
---|---|
System.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 |
Implements
System.IDisposable