Struct qjsonrpc::ServerEndpoint
source · pub struct ServerEndpoint { /* private fields */ }
Expand description
A QUIC Server Endpoint for using JSON-RPC.
Based on the QUINN library’s implementation of QUIC.
As per ClientEndpoint
, the additional fields are added for unit testing, but could potentially
be used by callers of the library.
Implementations§
source§impl ServerEndpoint
impl ServerEndpoint
sourcepub fn new<P: AsRef<Path>>(
cert_path: P,
key_path: P,
idle_timeout: Option<u64>
) -> Result<Self>
pub fn new<P: AsRef<Path>>( cert_path: P, key_path: P, idle_timeout: Option<u64> ) -> Result<Self>
Create a new ServerEndpoint
instance.
The path of a certificate is required.
The corresponding private key for the certificate is required.
An optional idle timeout can be specified in milliseconds; otherwise a default of 18 seconds will be used.