struct Movie::Address

Overview

Address represents the location of an actor system. For local actors, host and port are nil. For remote actors, they specify the network location.

Included Modules

Defined in:

movie/path.cr

Constructors

Instance Method Summary

Constructor Detail

def self.local(system_name : String) : Address #

Creates a local address for the given system name.


[View source]
def self.new(protocol : String, system : String, host : String | Nil = nil, port : Int32 | Nil = nil) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]
def self.parse(uri : String) : Address #

Parses an address URI string. Format: protocol://system@host:port or protocol://system (for local) Examples: "movie://my-system" -> local address "movie.tcp://my-system@127.0.0.1:2552" -> remote address


[View source]
def self.remote(system_name : String, host : String, port : Int32) : Address #

Creates a remote address.


[View source]

Instance Method Detail

def ==(other : Address) : Bool #

[View source]
def hash(hasher) #
Description copied from struct Struct

See Object#hash(hasher)


[View source]
def host : String | Nil #

[View source]
def local? : Bool #

Returns true if this is a local address (no host/port).


[View source]
def port : Int32 | Nil #

[View source]
def protocol : String #

[View source]
def remote? : Bool #

Returns true if this is a remote address.


[View source]
def system : String #

[View source]
def to_s(io : IO) : Nil #
Description copied from struct Struct

Same as #inspect(io).


[View source]
def to_s : String #

Returns the canonical string representation.


[View source]