pub struct OrbOptions {Show 35 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 fragment_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 client_idle_timeout: Option<Duration>,
pub server_idle_timeout: Option<Duration>,
pub max_server_connections: usize,
pub offer_bidir: bool,
pub accept_bidir: bool,
pub socket_send_buffer: Option<usize>,
pub socket_receive_buffer: Option<usize>,
pub tls_endpoints: Vec<EndpointAddr>,
pub tls_endpoint_publish: Option<EndpointAddr>,
pub unix_endpoints: Vec<String>,
pub tls: TlsOptions,
pub trace_level: Option<u32>,
pub trace_time: Option<bool>,
pub arguments: Vec<String>,
pub orb_id: String,
pub server_id: String,
pub initializers: Vec<Arc<dyn OrbInitializer>>,
}Expand description
Settings of an Orb.
Fields§
§max_giop_version: VersionThe highest GIOP version used for requests. A request uses the lower of this and the version of the target’s IIOP profile.
byte_order: ByteOrderByte 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: usizeLargest GIOP message, header included and fragments joined, that
the ORB sends or accepts (-ORBgiopMaxMsgSize N; default 64 MiB).
A request over it is not sent (MARSHAL, completed no), a reply
over it is replaced by MARSHAL, completed yes; a message
received over it closes the connection.
fragment_size: usizeSplits GIOP 1.2 requests and replies longer than this many bytes
into Fragment messages of at most this length
(-ORBgiopFragmentSize N; at least 1024, rounded down to a
multiple of 8). 0, the default, sends every message whole. GIOP 1.1
messages are never split. See docs/message-size.md.
max_forwards: u32How 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: usizeNumber 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: usizeUpcall threads kept running even when idle.
max_server_threads: usizeMost upcall threads running at once (-ORBmaxServerThreadPoolSize).
Requests beyond that wait in a queue.
server_thread_idle_timeout: DurationHow long an upcall thread beyond min_server_threads waits for work
before it ends.
follow_linger: DurationHow 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: usizeHow 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: usizeRequests of one connection that may wait or run at once. Beyond that the connection is not read until one completes.
client_idle_timeout: Option<Duration>Closes a client connection nothing was sent or received on for
this long, with no reply awaited (-ORBoutConScanPeriod S, in
seconds, 0 for never; default 120 s). The next call opens a new
one. See docs/connections.md.
server_idle_timeout: Option<Duration>Closes a server connection with CloseConnection when no request
came in for this long and none is running
(-ORBinConScanPeriod S, in seconds, 0 for never; default 180 s).
max_server_connections: usizeMost connections the server side keeps open at once
(-ORBmaxServerConnections N; 0, the default, for no limit). At
the limit the connection used least recently, of those with no
request running, is closed with CloseConnection, and new
connections wait in the listen backlog until one ends.
offer_bidir: boolOffers the connections this ORB opens for requests from the server
(bidirectional GIOP, -ORBofferBiDirectionalGIOP 0|1; default
off): GIOP 1.2 requests carry the addresses of this ORB’s endpoints
in a BI_DIR_IIOP service context, and requests that come back
over the connection reach the POAs with the BidirectionalPolicy
BOTH. See docs/bidir-giop.md.
accept_bidir: boolUses a connection a client offered for bidirectional GIOP to call
the objects at the addresses it gave
(-ORBacceptBiDirectionalGIOP 0|1; default off). See
docs/bidir-giop.md for when the addresses are believed.
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).
unix_endpoints: Vec<String>Unix domain sockets to listen on (omniORB’s
-ORBendPoint giop:unix:PATH, Linux and macOS only): each entry is
the path of the socket. An empty path is a new socket in
/tmp/omni-USER/, and a path ending in / a new socket in that
directory. Published in the TAG_OMNIORB_UNIX_TRANS components of
IORs, which clients on the same host use before TCP. See
docs/unix-transport.md.
tls: TlsOptionsCertificates, key and checks of TLS connections, client and server.
trace_level: Option<u32>The trace level of the process (-ORBtraceLevel N), set when the
ORB is created; None leaves it as it is (1 at first). See
trace and docs/tracing.md.
trace_time: Option<bool>Whether trace lines on standard error start with the time
(-ORBtraceTime 0|1), set when the ORB is created; None leaves
it as it is (off at first).
arguments: Vec<String>The arguments the ORB was created with, for
OrbInitInfo::arguments.
Orb::init sets them to its arguments, ORB options included.
orb_id: StringThe ORB id (-ORBid), for the Portable Interceptors.
server_id: StringThe server id (-ORBServerId), for the Portable Interceptors.
initializers: Vec<Arc<dyn OrbInitializer>>The OrbInitializers of this ORB,
run after those of
register_orb_initializer
(docs/portable-interceptors.md).
Implementations§
Source§impl OrbOptions
impl OrbOptions
Sourcepub fn parse_args(
&mut self,
args: &mut Vec<String>,
) -> Result<(), SystemException>
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.
| Option | Setting |
|---|---|
-ORBInitRef Name=URL | init_refs |
-ORBid ID | orb_id |
-ORBServerId ID | server_id |
-ORBDefaultInitRef URL | default_init_ref |
-ORBmaxGIOPVersion 1.1 | max_giop_version |
-ORBgiopMaxMsgSize N | max_message_size, in bytes (at least 1024) |
-ORBgiopFragmentSize N | fragment_size, in bytes (0, or at least 1024) |
-ORBclientConnectTimeOutPeriod MS | connect_timeout (0 for none) |
-ORBclientCallTimeOutPeriod MS | request_timeout (0 for none) |
-ORBsupportPerThreadTimeOut 0|1 | accepted and ignored: per-thread timeouts always work |
-ORBendPoint giop:tcp:HOST:PORT | endpoints (repeatable) |
-ORBendPointPublish giop:tcp:HOST:PORT | endpoint_publish (all(addr) for the default) |
-ORBmaxServerThreadPoolSize N | max_server_threads |
-ORBfollowLinger US | follow_linger, in microseconds |
-ORBfollowLimit N | follow_limit |
-ORBoutConScanPeriod S | client_idle_timeout, in seconds (0 for never) |
-ORBinConScanPeriod S | server_idle_timeout, in seconds (0 for never) |
-ORBmaxServerConnections N | max_server_connections (0 for no limit) |
-ORBofferBiDirectionalGIOP 0|1 | offer_bidir |
-ORBacceptBiDirectionalGIOP 0|1 | accept_bidir |
-ORBendPoint giop:ssl:HOST:PORT | tls_endpoints (repeatable) |
-ORBendPointPublish giop:ssl:HOST:PORT | tls_endpoint_publish |
-ORBendPoint giop:unix:PATH | unix_endpoints (repeatable; Unix only) |
-ORBsslCAFile PATH | TlsOptions::ca_file |
-ORBsslCertFile PATH | TlsOptions::cert_file |
-ORBsslKeyFile PATH | TlsOptions::key_file |
-ORBsslVerifyClient none|optional|required | TlsOptions::client_auth |
-ORBsslVerifyHost 0|1 | TlsOptions::verify_host |
-ORBtraceLevel N | trace_level |
-ORBtraceTime 0|1 | trace_time |
The value may also follow the option name after =, as in
-ORBmaxGIOPVersion=1.1.