Skip to main content

OrbOptions

Struct OrbOptions 

Source
pub struct OrbOptions {
Show 22 fields pub max_giop_version: Version, pub byte_order: ByteOrder, pub connect_timeout: Option<Duration>, pub request_timeout: Option<Duration>, pub max_message_size: usize, pub max_forwards: u32, pub init_refs: HashMap<String, String>, pub default_init_ref: Option<String>, pub io_threads: usize, pub endpoints: Vec<EndpointAddr>, pub endpoint_publish: Option<EndpointAddr>, pub min_server_threads: usize, pub max_server_threads: usize, pub server_thread_idle_timeout: Duration, pub follow_linger: Duration, pub follow_limit: usize, pub max_requests_per_connection: usize, pub socket_send_buffer: Option<usize>, pub socket_receive_buffer: Option<usize>, pub tls_endpoints: Vec<EndpointAddr>, pub tls_endpoint_publish: Option<EndpointAddr>, pub tls: TlsOptions,
}
Expand description

Settings of an Orb.

Fields§

§max_giop_version: Version

The highest GIOP version used for requests. A request uses the lower of this and the version of the target’s IIOP profile.

§byte_order: ByteOrder

Byte order of the messages rustorb sends.

§connect_timeout: Option<Duration>

How long to wait for a TCP connection; None waits until the call timeout expires, or as long as the operating system does. Expiry raises TIMEOUT, completed no. The initial value of Orb::set_connect_timeout.

§request_timeout: Option<Duration>

How long to wait for a reply; None waits forever. Expiry raises TIMEOUT, completed maybe. The initial value of Orb::set_call_timeout; see there for the timeouts that override it.

§max_message_size: usize

Largest message accepted from a server, fragments joined.

§max_forwards: u32

How many LOCATION_FORWARD replies one invocation follows before it gives up with TRANSIENT.

§init_refs: HashMap<String, String>

Initial references by name (-ORBInitRef Name=URL).

§default_init_ref: Option<String>

Base URL for initial references not in init_refs (-ORBDefaultInitRef URL); the name is appended after a /.

§io_threads: usize

Number of tokio worker threads for network I/O.

§endpoints: Vec<EndpointAddr>

Addresses to listen on for requests (-ORBendPoint giop:tcp:HOST:PORT). Empty means one endpoint on every interface with a port the operating system chooses. The server side starts listening when the RootPOA is first used.

§endpoint_publish: Option<EndpointAddr>

Address published in IORs instead of the listening one (-ORBendPointPublish giop:tcp:HOST:PORT); a port of 0 keeps the listening port.

§min_server_threads: usize

Upcall threads kept running even when idle.

§max_server_threads: usize

Most upcall threads running at once (-ORBmaxServerThreadPoolSize). Requests beyond that wait in a queue.

§server_thread_idle_timeout: Duration

How long an upcall thread beyond min_server_threads waits for work before it ends.

§follow_linger: Duration

How long an upcall thread that answered a request waits for the next request of the same connection, to read and run it itself (-ORBfollowLinger US, in microseconds; docs/read-ownership.md). Zero turns this off: the I/O task reads every request.

§follow_limit: usize

How many requests of one connection an upcall thread reads in a row before it lets the I/O task read again (-ORBfollowLimit N). Zero turns this off.

§max_requests_per_connection: usize

Requests of one connection that may wait or run at once. Beyond that the connection is not read until one completes.

§socket_send_buffer: Option<usize>

The socket send buffer of each connection (SO_SNDBUF), client and server; None leaves the operating system’s default (which on Linux grows as needed).

§socket_receive_buffer: Option<usize>

The socket receive buffer of each connection (SO_RCVBUF); None leaves the operating system’s default.

§tls_endpoints: Vec<EndpointAddr>

Addresses to listen on for requests over TLS (SSLIOP, -ORBendPoint giop:ssl:HOST:PORT). Published in the TAG_SSL_SEC_TRANS component of IORs; with TLS endpoints and none in endpoints, the ORB has no unprotected endpoint. Needs tls with a key file.

§tls_endpoint_publish: Option<EndpointAddr>

Address published for the first TLS endpoint instead of the listening one (-ORBendPointPublish giop:ssl:HOST:PORT).

§tls: TlsOptions

Certificates, key and checks of TLS connections, client and server.

Implementations§

Source§

impl OrbOptions

Source

pub fn parse_args( &mut self, args: &mut Vec<String>, ) -> Result<(), SystemException>

Reads ORB options from command line arguments and removes them, like CORBA::ORB_init. Other arguments are left in place.

OptionSetting
-ORBInitRef Name=URLinit_refs
-ORBDefaultInitRef URLdefault_init_ref
-ORBmaxGIOPVersion 1.1max_giop_version
-ORBclientConnectTimeOutPeriod MSconnect_timeout (0 for none)
-ORBclientCallTimeOutPeriod MSrequest_timeout (0 for none)
-ORBsupportPerThreadTimeOut 0|1accepted and ignored: per-thread timeouts always work
-ORBendPoint giop:tcp:HOST:PORTendpoints (repeatable)
-ORBendPointPublish giop:tcp:HOST:PORTendpoint_publish (all(addr) for the default)
-ORBmaxServerThreadPoolSize Nmax_server_threads
-ORBfollowLinger USfollow_linger, in microseconds
-ORBfollowLimit Nfollow_limit
-ORBendPoint giop:ssl:HOST:PORTtls_endpoints (repeatable)
-ORBendPointPublish giop:ssl:HOST:PORTtls_endpoint_publish
-ORBsslCAFile PATHTlsOptions::ca_file
-ORBsslCertFile PATHTlsOptions::cert_file
-ORBsslKeyFile PATHTlsOptions::key_file
-ORBsslVerifyClient none|optional|requiredTlsOptions::client_auth
-ORBsslVerifyHost 0|1TlsOptions::verify_host

The value may also follow the option name after =, as in -ORBmaxGIOPVersion=1.1.

Trait Implementations§

Source§

impl Clone for OrbOptions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OrbOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for OrbOptions

Source§

fn default() -> OrbOptions

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.