pub struct SessionClientResponse {Show 14 fields
pub active_clients: Vec<String>,
pub destination: String,
pub forward_path: RoutingOptions,
pub hopr_mtu: u64,
pub ip: String,
pub max_client_sessions: u64,
pub max_surb_upstream: Option<String>,
pub port: i32,
pub protocol: IpProtocol,
pub response_buffer: Option<String>,
pub return_path: RoutingOptions,
pub session_pool: Option<u64>,
pub surb_len: u64,
pub target: String,
}Expand description
Response body for creating a new client session.
JSON schema
{
"description": "Response body for creating a new client session.",
"examples": [
{
"activeClients": [],
"destination": "0x5112D584a1C72Fc250176B57aEba5fFbbB287D8F",
"forwardPath": {
"Hops": 1
},
"hoprMtu": 1002,
"ip": "127.0.0.1",
"maxClientSessions": 2,
"maxSurbUpstream": "2000 kb/s",
"port": 5542,
"protocol": "tcp",
"responseBuffer": "2 MB",
"returnPath": {
"Hops": 1
},
"sessionPool": 0,
"surbLen": 398,
"target": "example.com:80"
}
],
"type": "object",
"required": [
"activeClients",
"destination",
"forwardPath",
"hoprMtu",
"ip",
"maxClientSessions",
"port",
"protocol",
"returnPath",
"surbLen",
"target"
],
"properties": {
"activeClients": {
"description": "Lists Session IDs of all active clients.\n\nCan contain multiple entries on TCP sessions, but currently\nalways only a single entry on UDP sessions.",
"type": "array",
"items": {
"type": "string"
}
},
"destination": {
"description": "Destination node (exit node) of the Session.",
"type": "string"
},
"forwardPath": {
"$ref": "#/components/schemas/RoutingOptions"
},
"hoprMtu": {
"description": "MTU used by the underlying HOPR transport.",
"type": "integer",
"minimum": 0.0
},
"ip": {
"description": "Listening IP address of the Session's socket.",
"examples": [
"127.0.0.1"
],
"type": "string"
},
"maxClientSessions": {
"description": "The maximum number of client sessions that the listener can spawn.\n\nThis currently applies only to the TCP sessions, as UDP sessions cannot\nhave multiple clients (defaults to 1 for UDP).",
"type": "integer",
"minimum": 0.0
},
"maxSurbUpstream": {
"description": "The maximum throughput at which artificial SURBs might be generated and sent\nto the recipient of the Session.",
"type": [
"string",
"null"
]
},
"port": {
"description": "Listening port of the Session's socket.",
"examples": [
5542
],
"type": "integer",
"format": "int32",
"minimum": 0.0
},
"protocol": {
"$ref": "#/components/schemas/IpProtocol"
},
"responseBuffer": {
"description": "The amount of response data the Session counterparty can deliver back to us, without us\nsending any SURBs to them.",
"type": [
"string",
"null"
]
},
"returnPath": {
"$ref": "#/components/schemas/RoutingOptions"
},
"sessionPool": {
"description": "How many Sessions to pool for clients.",
"type": [
"integer",
"null"
],
"minimum": 0.0
},
"surbLen": {
"description": "Size of a Single Use Reply Block used by the protocol.\n\nThis is useful for SURB balancing calculations.",
"type": "integer",
"minimum": 0.0
},
"target": {
"description": "Target of the Session.",
"examples": [
"example.com:80"
],
"type": "string"
}
}
}Fields§
§active_clients: Vec<String>Lists Session IDs of all active clients.
Can contain multiple entries on TCP sessions, but currently always only a single entry on UDP sessions.
destination: StringDestination node (exit node) of the Session.
forward_path: RoutingOptions§hopr_mtu: u64MTU used by the underlying HOPR transport.
ip: StringListening IP address of the Session’s socket.
max_client_sessions: u64The maximum number of client sessions that the listener can spawn.
This currently applies only to the TCP sessions, as UDP sessions cannot have multiple clients (defaults to 1 for UDP).
max_surb_upstream: Option<String>The maximum throughput at which artificial SURBs might be generated and sent to the recipient of the Session.
port: i32Listening port of the Session’s socket.
protocol: IpProtocol§response_buffer: Option<String>The amount of response data the Session counterparty can deliver back to us, without us sending any SURBs to them.
return_path: RoutingOptions§session_pool: Option<u64>How many Sessions to pool for clients.
surb_len: u64Size of a Single Use Reply Block used by the protocol.
This is useful for SURB balancing calculations.
target: StringTarget of the Session.
Trait Implementations§
Source§impl Clone for SessionClientResponse
impl Clone for SessionClientResponse
Source§fn clone(&self) -> SessionClientResponse
fn clone(&self) -> SessionClientResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionClientResponse
impl Debug for SessionClientResponse
Source§impl<'de> Deserialize<'de> for SessionClientResponse
impl<'de> Deserialize<'de> for SessionClientResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SessionClientResponse
impl RefUnwindSafe for SessionClientResponse
impl Send for SessionClientResponse
impl Sync for SessionClientResponse
impl Unpin for SessionClientResponse
impl UnwindSafe for SessionClientResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more