class Movie::Remote::Connection

Overview

A durable logical association whose socket generation can be replaced after failure. Actor refs retain this object rather than a transient socket.

Defined in:

movie/remote/connection.cr

Constant Summary

Log = ::Log.for(self)

Constructors

Instance Method Summary

Constructor Detail

def self.new(address : Address, path_registry : Movie::PathRegistry, system : Movie::AbstractActorSystem, local_address : Proc(Address), node_uid : String, settings : AssociationSettings = AssociationSettings.new, on_message : Proc(WireEnvelope, Nil) | Nil = nil) #

[View source]

Instance Method Detail

def active? : Bool #

[View source]
def address : Address #

[View source]
def close #

[View source]
def closed? : Bool #

[View source]
def connect : Bool #

Makes one synchronous attempt, then keeps retrying in the background.


[View source]
def connected? : Bool #

[View source]
def generation : Int64 #

[View source]
def pending_control_count : Int32 #

[View source]
def register_pending_ask(correlation_id : String) : Channel(WireEnvelope) #

[View source]
def remove_pending_ask(correlation_id : String) #

[View source]
def send(envelope : WireEnvelope) : Bool #

User traffic is accepted only by an active generation and is never replayed across reconnects.


[View source]
def send_control(envelope : WireEnvelope) : Bool #

Reliable system/control messages remain pending until acknowledged and are replayed in sequence after a new socket generation is active.


[View source]
def state : State #

[View source]
def stats : ConnectionStats #

[View source]