class Shatter::Connection

Defined in:

shatter/connection.cr

Constructors

Instance Method Summary

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) #

[View source]

Instance Method Detail

def block_states : Array(String) #

[View source]
def codec : Codec #

def codec=(codec : Codec) #

[View source]
def codec? : Codec | Nil #

def entities : Hash(UInt32, Shatter::Data::Entity) #

[View source]
def inspect(io : IO) : Nil #
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>

[View source]
def io : IO #

[View source]
def io=(io : IO | Nil) #

[View source]
def ip : String #

[View source]
def matching_cb(i : UInt32) : Packet::Cb::Login | Packet::Cb::Play | Packet::Cb::Status #

[View source]
def minecraft_token : String #

[View source]
def outbound : Channel({pid: Slice(UInt8), body: Slice(UInt8)}) #

[View source]
def packet(packet_id : Packet::Sb::Play | Packet::Sb::Status | Packet::Sb::Login | Packet::Sb::Handshake, &block : IO -> ) #

[View source]
def packet_callback : Packet::Handler, Connection -> | Nil #

[View source]
def ping #

[View source]
def players : Hash(UUID, Shatter::Data::Player) #

[View source]
def port : Int32 #

[View source]
def profile : MSA::MinecraftProfile #

[View source]
def protocol : UInt32 #

[View source]
def registry : Registry #

[View source]
def run #

[View source]
def sock : TCPSocket | Nil #

[View source]
def sock=(sock : TCPSocket | Nil) #

[View source]
def start_outbound_handler #

[View source]

[View source]
def transition(s : Packet::State) #

[View source]
def use_crypto_io(io : Crypto::CipherStreamIO) #

[View source]
def using_compression : UInt32 #

[View source]
def using_compression=(using_compression : UInt32) #

[View source]
def using_crypto : Bool #

[View source]
def using_crypto=(using_crypto : Bool) #

[View source]