SynchronousLocalConnection

channels.SynchronousLocalConnection

Allows establishing direct synchronous connections between a single “server” and multiple “clients”.

Synchronous here means that any send calls immediately execute the handler code no the receiving side (after a couple of callback indirections). There is no runtime and no threads and the send call will only return after the handling code has completed.

It does not matter if the server or client is started first, connection is established immediately when the second one joins the connection.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Classlikes

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.

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

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

Value members

Concrete methods

def client(id: String): LatentConnection[T]

Clients create both the client side and server side connection object.

Clients create both the client side and server side connection object.

Attributes