vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Function pipeRealtime

Pipes a stream to another while keeping the latency within the specified threshold.

void pipeRealtime(OutputStream, ConnectionStream) (
  OutputStream destination,
  ConnectionStream source,
  ulong nbytes = 0,
  Duration max_latency = 0.seconds
)
if (isOutputStream!OutputStream && isConnectionStream!ConnectionStream);

Parameters

NameDescription
destination The destination stram to pipe into
source The source stream to read data from
nbytes Number of bytes to pipe through. The default of zero means to pipe the whole input stream.
max_latency The maximum time before data is flushed to destination. The default value of 0 s will flush after each chunk of data read from source.

See also

OutputStream.write

Authors

Sönke Ludwig

Copyright

© 2012-2016 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.