class HqTrivia::Connection::Local

Overview

Local connection, given an array of messaegs, it parses them and yields them to the block

Included Modules

Defined in:

hqtrivia/connection/local.cr

Constructors

Instance Method Summary

Instance methods inherited from module HqTrivia::Connection::Interface

connect(coordinator : Coordinator) connect, on_client_ping(&block : String -> ) on_client_ping, on_message(&block : HqTrivia::Model::WebSocketMessage -> ) on_message, on_raw_message(&block : String -> ) on_raw_message, on_server_pong(&block : String -> ) on_server_pong, open? open?, run run, send_message(message : String) send_message

Constructor Detail

def self.new(raw_messages : Array(String)) #

[View source]

Instance Method Detail

def connect(coordinator : Coordinator) #

Connect to a show using the given coordinator


[View source]
def open? : Bool #

True if open, false otherwise


[View source]
def run #

Starts the connections


[View source]
def send_message(message : String) #

Sends the message to the connection


[View source]