pub struct IPCServer<PRC, RTF, IPF, WTF, OPF>where
PRC: TProcessor + Send + Sync + 'static,
RTF: TReadTransportFactory + 'static,
IPF: TInputProtocolFactory + 'static,
WTF: TWriteTransportFactory + 'static,
OPF: TOutputProtocolFactory + 'static,{
pub cnn: Option<IncomingConnection<PRC>>,
/* private fields */
}Fields§
§cnn: Option<IncomingConnection<PRC>>Implementations§
Source§impl<PRC, RTF, IPF, WTF, OPF> IPCServer<PRC, RTF, IPF, WTF, OPF>where
PRC: TProcessor + Send + Sync + 'static,
RTF: TReadTransportFactory + 'static,
IPF: TInputProtocolFactory + 'static,
WTF: TWriteTransportFactory + 'static,
OPF: TOutputProtocolFactory + 'static,
impl<PRC, RTF, IPF, WTF, OPF> IPCServer<PRC, RTF, IPF, WTF, OPF>where
PRC: TProcessor + Send + Sync + 'static,
RTF: TReadTransportFactory + 'static,
IPF: TInputProtocolFactory + 'static,
WTF: TWriteTransportFactory + 'static,
OPF: TOutputProtocolFactory + 'static,
Sourcepub fn new(
read_transport_factory: RTF,
input_protocol_factory: IPF,
write_transport_factory: WTF,
output_protocol_factory: OPF,
processor: PRC,
) -> IPCServer<PRC, RTF, IPF, WTF, OPF>
pub fn new( read_transport_factory: RTF, input_protocol_factory: IPF, write_transport_factory: WTF, output_protocol_factory: OPF, processor: PRC, ) -> IPCServer<PRC, RTF, IPF, WTF, OPF>
Create a IPCServer.
Each accepted connection has an input and output half, each of which
requires a TTransport and TProtocol. IPCServer uses
read_transport_factory and input_protocol_factory to create
implementations for the input, and write_transport_factory and
output_protocol_factory to create implementations for the output.
Sourcepub fn listen<A: ToSocketAddrs>(&mut self, listen_address: A) -> Result<()>
pub fn listen<A: ToSocketAddrs>(&mut self, listen_address: A) -> Result<()>
Listen for incoming connections on listen_address.
listen_address should implement ToSocketAddrs trait.
Return () if successful.
Return Err when the server cannot bind to listen_address or there
is an unrecoverable error.
pub fn accept<A: ToSocketAddrs>(&mut self, listen_address: A) -> Result<()>
pub fn handle_apply_request(&mut self) -> Result<()>
pub fn end_loop(&mut self)
Auto Trait Implementations§
impl<PRC, RTF, IPF, WTF, OPF> Freeze for IPCServer<PRC, RTF, IPF, WTF, OPF>
impl<PRC, RTF, IPF, WTF, OPF> !RefUnwindSafe for IPCServer<PRC, RTF, IPF, WTF, OPF>
impl<PRC, RTF, IPF, WTF, OPF> Send for IPCServer<PRC, RTF, IPF, WTF, OPF>
impl<PRC, RTF, IPF, WTF, OPF> !Sync for IPCServer<PRC, RTF, IPF, WTF, OPF>
impl<PRC, RTF, IPF, WTF, OPF> Unpin for IPCServer<PRC, RTF, IPF, WTF, OPF>
impl<PRC, RTF, IPF, WTF, OPF> !UnwindSafe for IPCServer<PRC, RTF, IPF, WTF, OPF>
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