class ProtoHackers::LRCPServer

Defined in:

7_line_reversal.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(server : UDPSocket, state : ProtoHackers::LRState) #

[View source]

Instance Method Detail

def chunks(data : String, chunk_size : Int32 = CHUNK_SIZE) : Array(String) #

[View source]
def decode_message(ip : Socket::IPAddress, data : String) : LRMessage | Nil #

[View source]
def handle_ack(ip : Socket::IPAddress, message : ProtoHackers::AckMessage) #

[View source]
def handle_close(ip : Socket::IPAddress, message : ProtoHackers::CloseMessage) #

[View source]
def handle_connect(ip : Socket::IPAddress, message : ProtoHackers::ConnectMessage) #

[View source]
def handle_data(ip : Socket::IPAddress, message : ProtoHackers::DataMessage) #

[View source]
def handle_request(ip : Socket::IPAddress, data : String) #

[View source]
def outbound #

[View source]
def server : UDPSocket #

[View source]
def server=(server : UDPSocket) #

[View source]
def state : ProtoHackers::LRState #

[View source]
def state=(state : ProtoHackers::LRState) #

[View source]
def unacked_reaper #

[View source]