BrokerListener
Module: broker::server::BrokerListener
Section titled “Module: broker::server::BrokerListener”Contents
Section titled “Contents”Functions
accept_one- Accept one shim connection, invokehandler(request), and write thebound_endpoint- Return the address this listener is actually bound to.
firma_secret_provider::broker::server::BrokerListener::accept_one
Section titled “firma_secret_provider::broker::server::BrokerListener::accept_one”Function
Accept one shim connection, invoke handler(request), and write the
response back.
The whole read-then-run-then-write exchange is bounded by
[firma_config_schema::broker::BrokerConfig::operation_timeout],
and on Unix the connecting shim’s credentials are validated before the
request is read. A rejected connection receives an error response.
Errors
Section titled “Errors”Returns [AcceptError::Listener] when the listener socket itself can no
longer accept. Returns [AcceptError::Connection] for per-connection
failures (timeout, malformed framing, I/O failure, rejected peer
credentials). Connection errors affect only the current peer; a robust
accept loop must keep accepting. Handler rejections are serialized as
{"type":"rejected","error":"..."} responses rather than returned here.
fn accept_one<F>(self: &Self, handler: F) -> Result<(), AcceptError>firma_secret_provider::broker::server::BrokerListener::bound_endpoint
Section titled “firma_secret_provider::broker::server::BrokerListener::bound_endpoint”Function
Return the address this listener is actually bound to.
Errors
Section titled “Errors”Returns an error if the OS cannot report the local address.
fn bound_endpoint(self: &Self) -> io::Result<EndpointInner>