struct
Movie::Address
- Movie::Address
- Struct
- Value
- Object
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
- JSON::Serializable
Defined in:
movie/path.crConstructors
-
.local(system_name : String) : Address
Creates a local address for the given system name.
- .new(protocol : String, system : String, host : String | Nil = nil, port : Int32 | Nil = nil)
- .new(pull : JSON::PullParser)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
-
.parse(uri : String) : Address
Parses an address URI string.
-
.remote(system_name : String, host : String, port : Int32) : Address
Creates a remote address.
Instance Method Summary
- #==(other : Address) : Bool
-
#hash(hasher)
See
Object#hash(hasher) - #host : String | Nil
-
#local? : Bool
Returns true if this is a local address (no host/port).
- #port : Int32 | Nil
- #protocol : String
-
#remote? : Bool
Returns true if this is a remote address.
- #system : String
-
#to_s(io : IO) : Nil
Same as
#inspect(io). -
#to_s : String
Returns the canonical string representation.
Constructor Detail
Creates a local address for the given system name.
def self.new(protocol : String, system : String, host : String | Nil = nil, port : Int32 | Nil = nil)
#
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
Creates a remote address.