pub struct StompPeer {
stream: MaybeTlsStream<TcpStream>,
buf: Vec<u8>,
}Expand description
Raw STOMP client for tests: CONNECT, SUBSCRIBE, SEND, recv.
Not the gateway adapter. Use this as the “other side” of
start_mini_broker or a live ActiveMQ.
Fields§
§stream: MaybeTlsStream<TcpStream>§buf: Vec<u8>Implementations§
Source§impl StompPeer
impl StompPeer
Sourcepub async fn connect(addr: SocketAddr) -> Self
pub async fn connect(addr: SocketAddr) -> Self
CONNECT 1.2 / host / / no heartbeats, then wait for
CONNECTED.
Panics if the socket cannot be opened or the first frame is not CONNECTED.
Sourcepub async fn connect_tls(addr: SocketAddr, tls: &ClientTls) -> Self
pub async fn connect_tls(addr: SocketAddr, tls: &ClientTls) -> Self
As Self::connect, negotiating TLS per tls before CONNECT.
Panics if the socket cannot be opened, the TLS handshake fails, or the first frame after CONNECT is not CONNECTED.
async fn handshake(stream: MaybeTlsStream<TcpStream>) -> Self
Sourcepub async fn subscribe(&mut self, id: &str, dest: &str)
pub async fn subscribe(&mut self, id: &str, dest: &str)
SUBSCRIBE with ack:auto. Does not wait for a receipt.
Auto Trait Implementations§
impl !Freeze for StompPeer
impl !RefUnwindSafe for StompPeer
impl Send for StompPeer
impl Sync for StompPeer
impl Unpin for StompPeer
impl !UnwindSafe for StompPeer
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