class PlaceOS::Edge::Transport

Overview

WebSocket Transport

Defined in:

placeos-edge/transport.cr

Constant Summary

Log = ::Log.for(self)

Constructors

Instance Method Summary

Constructor Detail

def self.new(sequence_id : UInt64 = 0, on_disconnect : IO::Error | HTTP::WebSocket::CloseCode -> | Nil = nil, on_connect : Proc(Nil) | Nil = nil, &on_request : Tuple(UInt64, PlaceOS::Edge::Protocol::Request) -> ) #

[View source]

Instance Method Detail

def closed? #

[View source]
def connect(uri : URI, socket : HTTP::WebSocket | Nil) #

[View source]
def disconnect #

[View source]
def listen(socket : HTTP::WebSocket) #

[View source]
def ping(interval : Time::Span = 10.seconds) #

Periodically send a ping frame


[View source]
def sequence_id : UInt64 #

[View source]