class Shatter::Connection
- Shatter::Connection
- Reference
- Object
Defined in:
shatter/connection.crConstructors
Instance Method Summary
- #block_states : Array(String)
- #codec : Codec
- #codec=(codec : Codec)
- #codec? : Codec | Nil
- #entities : Hash(UInt32, Shatter::Data::Entity)
-
#inspect(io : IO) : Nil
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
- #io : IO
- #io=(io : IO | Nil)
- #ip : String
- #matching_cb(i : UInt32) : Packet::Cb::Login | Packet::Cb::Play | Packet::Cb::Status
- #minecraft_token : String
- #outbound : Channel({pid: Slice(UInt8), body: Slice(UInt8)})
- #packet(packet_id : Packet::Sb::Play | Packet::Sb::Status | Packet::Sb::Login | Packet::Sb::Handshake, &block : IO -> )
- #packet_callback : Packet::Handler, Connection -> | Nil
- #ping
- #players : Hash(UUID, Shatter::Data::Player)
- #port : Int32
- #profile : MSA::MinecraftProfile
- #protocol : UInt32
- #registry : Registry
- #run
- #sock : TCPSocket | Nil
- #sock=(sock : TCPSocket | Nil)
- #start_outbound_handler
- #state : Shatter::Packet::State
- #transition(s : Packet::State)
- #use_crypto_io(io : Crypto::CipherStreamIO)
- #using_compression : UInt32
- #using_compression=(using_compression : UInt32)
- #using_crypto : Bool
- #using_crypto=(using_crypto : Bool)
Constructor Detail
def self.new(protocol : UInt32, ip : String, port : Int32, registry : Shatter::Registry, block_states : Array(String), minecraft_token : String, profile : Shatter::MSA::MinecraftProfile, packet_callback : Nil | Shatter::Packet::Handler, Shatter::Connection -> _ = nil)
#
Instance Method Detail
Description copied from class Reference
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
def packet(packet_id : Packet::Sb::Play | Packet::Sb::Status | Packet::Sb::Login | Packet::Sb::Handshake, &block : IO -> )
#