server

channels.SynchronousLocalConnection.server
object server extends LatentConnection[T]

The server prepares by fullfillling the connectionEstablished promise, which contains a callback that allwows any number of clients to connect. The inner callback contains the Connection the server sends on, as well as a promise that the server completes immediately with it’s own receive handler.

Attributes

Graph
Supertypes
trait LatentConnection[T]
class Object
trait Matchable
class Any
Self type
server.type

Members list

Type members

Classlikes

case class Establish(serverSendsOn: Connection[T], clientConnectionSendsTo: Promise[Callback[T]])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def prepare(receiver: Receive[T]): Async[Abort, Connection[T]]

The returned async, when run, should establish connections with the given callback atomically. That is, no messages should be lost during setup. Similarly, the provider of the callback (the result of incoming) of this method should make sure that the other end of the callback is ready to receive callbacks before running the async.

The returned async, when run, should establish connections with the given callback atomically. That is, no messages should be lost during setup. Similarly, the provider of the callback (the result of incoming) of this method should make sure that the other end of the callback is ready to receive callbacks before running the async.

It is generally not assumed to be safe to run prepare twice (neither running a single async twice, nor running two different returned asyncs). Notably, “server” like implementations may try to bind a specific port, and immediately fail if that is not available.

The async may produce multiple connections and will run receiver for each of them.

Attributes

Concrete fields

val connectionEstablished: Promise[Callback[Establish]]