class Movie::Remote::AssociationSettings

Overview

Tunable lifecycle and security policy for outbound and inbound associations. Transport factories can wrap TCP sockets with TLS without coupling the remoting protocol to certificate provisioning.

Defined in:

movie/remote/association.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(reconnect_min_backoff : Time::Span = 50.milliseconds, reconnect_max_backoff : Time::Span = 2.seconds, reconnect_factor : Float64 = 2.0, reconnect_jitter : Float64 = 0.2, handshake_timeout : Time::Span = 2.seconds, heartbeat_interval : Time::Span = 1.second, heartbeat_timeout : Time::Span = 5.seconds, control_buffer_capacity : Int32 = 1024, control_deduplication_capacity : Int32 = 8192, shared_secret : String | Nil = nil, client_transport_factory : ClientTransportFactory | Nil = nil, server_transport_wrapper : ServerTransportWrapper | Nil = nil) #

[View source]

Instance Method Detail

def client_transport_factory : ClientTransportFactory | Nil #

[View source]
def connect(host : String, port : Int32) : IO #

[View source]
def control_buffer_capacity : Int32 #

[View source]
def control_deduplication_capacity : Int32 #

[View source]
def handshake_timeout : Time::Span #

[View source]
def heartbeat_interval : Time::Span #

[View source]
def heartbeat_timeout : Time::Span #

[View source]
def reconnect_delay(delay : Time::Span, random : Float64 = Random.rand) : Time::Span #

Applies symmetric jitter while preserving reconnect_max_backoff as a hard upper bound. The sample argument makes boundary behavior testable.


[View source]
def reconnect_factor : Float64 #

[View source]
def reconnect_jitter : Float64 #

[View source]
def reconnect_max_backoff : Time::Span #

[View source]
def reconnect_min_backoff : Time::Span #

[View source]
def server_transport_wrapper : ServerTransportWrapper | Nil #

[View source]
def shared_secret : String | Nil #

[View source]
def wrap(socket : TCPSocket) : IO #

[View source]