Struct ether_dream_dac_emulator::listener::ActiveStream
[−]
[src]
pub struct ActiveStream { /* fields omitted */ }
A handle to an active Stream thread.
The ActiveStream can be used to produce a stream Output. The stream::Output yields "frames" of points emitted by the inner stream::output::Processor thread.
Methods
impl ActiveStream
[src]
pub fn output(&self) -> Output
[src]
Produce a stream Output.
The stream::Output yields "frames" of points emitted by the inner stream::output::Processor thread. These frames are intended to be useful for debugging or visualisation.
pub fn wait(self) -> Error
[src]
Wait for the stream to be closed by the user and return the reason for shutdown.
pub fn close(self) -> Error
[src]
Close the TCP connection.
This returns the inner DAC state to the Listener and allows the listener to accept new connections.
pub fn set_nodelay(&self, b: bool) -> Result<()>
[src]
This directly calls set_nodelay
on the inner TcpStream. In other words, this sets the
value of the TCP_NODELAY option for this socket.
Note that due to the necessity for very low-latency communication with the DAC, this API
enables TCP_NODELAY
by default. This method is exposed in order to allow the user to
disable this if they wish.
When not set, data is buffered until there is a sufficient amount to send out, thereby avoiding the frequent sending of small packets. Although perhaps more efficient for the network, this may result in DAC underflows if Data commands are delayed for too long.
pub fn nodelay(&self) -> Result<bool>
[src]
Gets the value of the TCP_NODELAY option for this socket.
For more infnormation about this option, see set_nodelay
.
pub fn set_ttl(&self, ttl: u32) -> Result<()>
[src]
This directly calls set_ttl
on the inner TcpStream. In other words, this sets the
value for the IP_TTL
option on this socket.
This value sets the time-to-live field that is used in every packet sent from this socket. Time-to-live describes the number of hops between devices that a packet may make before it is discarded/ignored.
pub fn ttl(&self) -> Result<u32>
[src]
Gets the value of the IP_TTL
option for this socket.
For more information about this option see set_ttl
.