pub struct HttpRpcServer { /* private fields */ }Expand description
HTTP JSON-RPC server (runs alongside the existing TCP RPC server).
Implementations§
Source§impl HttpRpcServer
impl HttpRpcServer
Sourcepub fn new(addr: SocketAddr, rpc: Arc<RpcState>, event_capacity: usize) -> Self
pub fn new(addr: SocketAddr, rpc: Arc<RpcState>, event_capacity: usize) -> Self
Create a new HTTP RPC server.
event_capacity controls the broadcast channel buffer size for WebSocket events.
Sourcepub fn event_sender(&self) -> Sender<ChainEvent>
pub fn event_sender(&self) -> Sender<ChainEvent>
Get a broadcast::Sender so the node can publish chain events.
Auto Trait Implementations§
impl Freeze for HttpRpcServer
impl !RefUnwindSafe for HttpRpcServer
impl Send for HttpRpcServer
impl Sync for HttpRpcServer
impl Unpin for HttpRpcServer
impl UnsafeUnpin for HttpRpcServer
impl !UnwindSafe for HttpRpcServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more