Struct fuchsia_fuzzctl::SocketForwarder
source · pub struct SocketForwarder<O: OutputSink> { /* private fields */ }
Expand description
Forwarder for a single output stream.
Implementations§
source§impl<O: OutputSink> SocketForwarder<O>
impl<O: OutputSink> SocketForwarder<O>
sourcepub fn try_new(socket: Socket, writer: &Writer<O>) -> Result<Self>
pub fn try_new(socket: Socket, writer: &Writer<O>) -> Result<Self>
Converts a a socket into a SocketForwarder.
Returns an error if conversion to an async socket fails.
sourcepub async fn forward_text(&self, name: &str) -> Result<()>
pub async fn forward_text(&self, name: &str) -> Result<()>
Continuously forwards messages from the socket to the writer until the socket is closed.
sourcepub async fn forward_json(&self, name: &str) -> Result<()>
pub async fn forward_json(&self, name: &str) -> Result<()>
Continuously forwards JSON data from the socket to the writer until the socket is closed.