[−][src]Trait cargo_ether::StreamTransfer
A stream transfer protocol.
Required methods
fn connect(&mut self) -> Result<(), String>
Connect to stream. Most implments should do two things here:
Connect
to the stream.- Make sure the server / other peer is online and active.
fn recv(&mut self) -> Result<Option<Vec<u8>>, String>
Try to receive a data packet and remove it from queue.
fn peek(&mut self) -> Result<Option<Vec<u8>>, String>
Try to receive a data packet.
fn send(&mut self, data: Vec<u8>) -> Result<(), String>
Send a data packet to the server / other peer.