Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
EndpointResponse.cs
1using System;
2using System.Collections.Generic;
3using System.Net;
4
6{
10 public class EndpointResponse<ResponseType>
11 {
12 private readonly IPEndPoint endpoint;
13 private readonly ResponseType response;
14 private readonly Exception error;
15
16 internal EndpointResponse(IPEndPoint Endpoint, ResponseType Response,
17 Exception Error)
18 {
19 this.endpoint = Endpoint;
20 this.response = Response;
21 this.error = Error;
22 }
23
27 public IPEndPoint Endpoint => this.endpoint;
28
32 public ResponseType Response => this.response;
33
37 public Exception Error => this.error;
38
42 public bool Ok => this.error is null;
43 }
44}
Contains the response from one of the endpoints in the cluster.
bool Ok
If the command was executed without error on the endpoint.
Exception Error
Any error returned from the endpoint.
ResponseType Response
Response from endpoint