module HqTrivia::Connection::Interface

Direct including types

Defined in:

hqtrivia/connection/interface.cr

Instance Method Summary

Instance Method Detail

abstract def connect(coordinator : Coordinator) #

Connect to a show using the given coordinator


[View source]
def on_client_ping(&block : String -> ) #

[View source]
def on_message(&block : HqTrivia::Model::WebSocketMessage -> ) #

[View source]
def on_raw_message(&block : String -> ) #

Yields raw JSON to the block


[View source]
def on_server_pong(&block : String -> ) #

[View source]
abstract def open? #

True if connection is open, false otherwise


[View source]
abstract def run #

Starts the connection after connecting


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

Sends the message to the connection


[View source]