Struct mpc_websocket::Server
source · pub struct Server;
Expand description
MPC websocket server handling JSON-RPC requests.
Implementations§
source§impl Server
impl Server
sourcepub async fn start(
path: &'static str,
addr: impl Into<SocketAddr>,
static_files: PathBuf
) -> Result<()>
pub async fn start( path: &'static str, addr: impl Into<SocketAddr>, static_files: PathBuf ) -> Result<()>
Start the server.
The websocket endpoint is mounted at path
,
the server will bind to addr
and static assets
are served from static_files
.
Logs are emitted using the tracing library, in release mode the logs are formatted as JSON.