Server that uses streams as message transport. For an equivalent class implemented in Node.js see Executa's StreamServer.

Note

Override of Server read to read from a stream.

Override of Server write to write to a stream.

Super class

rasta::Server -> StreamServer

Methods

Public methods

Inherited methods

Method new()

Initialize the server.

Usage

StreamServer$new(executor = NULL, incoming = NULL, outgoing = NULL)

Arguments

executor

The executor to serve

incoming

The stream to read messages from

outgoing

The stream to write messages to


Method read()

Read a message.

Usage

StreamServer$read(blocking = TRUE)

Arguments

blocking

Should the read be a blocking operation?


Method write()

Write a message.

Usage

StreamServer$write(message)

Arguments

message

The message to write.


Method stop()

Stop the server. Override of Server$stop to close incoming and outgoing streams.

Usage

StreamServer$stop()


Method clone()

The objects of this class are cloneable with this method.

Usage

StreamServer$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.