class
Movie::Remote::Connection
- Movie::Remote::Connection
- Reference
- Object
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.crConstant Summary
-
Log =
::Log.for(self)
Constructors
Instance Method Summary
- #active? : Bool
- #address : Address
- #close
- #closed? : Bool
-
#connect : Bool
Makes one synchronous attempt, then keeps retrying in the background.
- #connected? : Bool
- #generation : Int64
- #pending_control_count : Int32
- #register_pending_ask(correlation_id : String) : Channel(WireEnvelope)
- #remove_pending_ask(correlation_id : String)
-
#send(envelope : WireEnvelope) : Bool
User traffic is accepted only by an active generation and is never replayed across reconnects.
-
#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.
- #state : State
- #stats : ConnectionStats
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)
#
Instance Method Detail
def send(envelope : WireEnvelope) : Bool
#
User traffic is accepted only by an active generation and is never replayed across reconnects.
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.