abstract class EncryptedTcp::ActionHandler

Overview


Generic implementation of an action that can be performed. The TCP_LISTENER sends data that it recieves via the socker directly here. The Action can perform logic on that data.


Direct Known Subclasses

Defined in:

tcp_engine/action_handler.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def check_ping(data, socket, encryptor) #

[View source]
abstract def handle(input) : String #

Handle is the single logic point of an action The input is the unencryped data request and the output will be the unencrypted response back to the client


[View source]
def locked_puts(socket, data) #

[View source]
def pong_response(socket : TCPSocket, encryptor) #

[View source]
def process(socket : Socket, encryptor : EncryptedTcp::Encryptor, data : String) #

For example purposes, just output data


[View source]