Server that uses streams as message transport.
For an equivalent class implemented in Node.js see Executa's
StreamServer
.
Override of Server
read
to read from
a stream.
Override of Server
write
to write to
a stream.
rasta::Server
-> StreamServer
new()
Initialize the server.
StreamServer$new(executor = NULL, incoming = NULL, outgoing = NULL)
executor
The executor to serve
incoming
The stream to read messages from
outgoing
The stream to write messages to
read()
Read a message.
StreamServer$read(blocking = TRUE)
blocking
Should the read be a blocking operation?
write()
Write a message.
StreamServer$write(message)
message
The message to write.
stop()
Stop the server.
Override of Server$stop
to close incoming and outgoing
streams.
StreamServer$stop()
clone()
The objects of this class are cloneable with this method.
StreamServer$clone(deep = FALSE)
deep
Whether to make a deep clone.