Struct ntex_amqp::server::Server [−][src]
pub struct Server<Io, St, H, Ctl> { /* fields omitted */ }
Expand description
Server dispatcher factory
Implementations
Provide connection configuration
Set max inbound frame size.
If max size is set to 0
, size is unlimited.
By default max size is set to 0
Set handshake timeout.
By default handshake timeuot is 5 seconds.
Set server connection disconnect timeout.
Defines a timeout for disconnect connection. If a disconnect procedure does not complete within this time, the connection get dropped.
To disable timeout set value to 0.
By default disconnect timeout is set to 3 seconds.
pub fn buffer_params(
self,
max_read_buf_size: u16,
max_write_buf_size: u16,
min_buf_size: u16
) -> Self
pub fn buffer_params(
self,
max_read_buf_size: u16,
max_write_buf_size: u16,
min_buf_size: u16
) -> Self
Set read/write buffer params
By default read buffer is 8kb, write buffer is 8kb
impl<Io, St, H, Ctl> Server<Io, St, H, Ctl> where
St: 'static,
Io: AsyncRead + AsyncWrite + Unpin + 'static,
H: ServiceFactory<Config = (), Request = Handshake<Io>, Response = HandshakeAck<Io, St>> + 'static,
H::Error: Debug,
Ctl: ServiceFactory<Config = State<St>, Request = ControlFrame, Response = ()> + 'static,
Ctl::Error: Debug,
Ctl::InitError: Debug,
Error: From<Ctl::Error>,
impl<Io, St, H, Ctl> Server<Io, St, H, Ctl> where
St: 'static,
Io: AsyncRead + AsyncWrite + Unpin + 'static,
H: ServiceFactory<Config = (), Request = Handshake<Io>, Response = HandshakeAck<Io, St>> + 'static,
H::Error: Debug,
Ctl: ServiceFactory<Config = State<St>, Request = ControlFrame, Response = ()> + 'static,
Ctl::Error: Debug,
Ctl::InitError: Debug,
Error: From<Ctl::Error>,
Service to call with control frames
pub fn finish<F, Pb>(
self,
service: F
) -> impl ServiceFactory<Config = (), Request = Io, Response = (), Error = ServerError<H::Error>, InitError = H::InitError> where
F: IntoServiceFactory<Pb>,
Pb: ServiceFactory<Config = State<St>, Request = Message, Response = ()> + 'static,
Pb::Error: Debug,
Pb::InitError: Debug,
Error: From<Pb::Error> + From<Ctl::Error>,
pub fn finish<F, Pb>(
self,
service: F
) -> impl ServiceFactory<Config = (), Request = Io, Response = (), Error = ServerError<H::Error>, InitError = H::InitError> where
F: IntoServiceFactory<Pb>,
Pb: ServiceFactory<Config = State<St>, Request = Message, Response = ()> + 'static,
Pb::Error: Debug,
Pb::InitError: Debug,
Error: From<Pb::Error> + From<Ctl::Error>,
Set service to execute for incoming links and create service factory
Auto Trait Implementations
impl<Io, St, H, Ctl> RefUnwindSafe for Server<Io, St, H, Ctl> where
Ctl: RefUnwindSafe,
H: RefUnwindSafe,
Io: RefUnwindSafe,
St: RefUnwindSafe,
impl<Io, St, H, Ctl> Unpin for Server<Io, St, H, Ctl> where
Ctl: Unpin,
H: Unpin,
Io: Unpin,
St: Unpin,
impl<Io, St, H, Ctl> UnwindSafe for Server<Io, St, H, Ctl> where
Ctl: UnwindSafe,
H: UnwindSafe,
Io: UnwindSafe,
St: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more