websocketsink 0.0.1
A stream consumer that writes output from all consumed streams to a WebSocket
websocketsink
A stream consumer that writes output from all consumed streams to a WebSocket
Example
writing the output of an Process to a WebSocket
void WebSocketSinkDemo(io.Process process, io.WebSocket socket) {
WebSocketSink sink = new WebSocketSink(socket);
process.stdout.pipe(sink);
process.stderr.pipe(sink);
socket.transform(new Utf8Encoder()).pipe(process.stdin);
// stdin and stdout of process will now be written to sink
// all incoming data on socket will be written to process.stdin
}