class PlaceOS::Driver::TransportWebsocket
Defined in:
placeos-driver/transport/websocket.crConstructors
-
.new(queue : PlaceOS::Driver::Queue, uri : String, settings : PlaceOS::Driver::Settings, headers_callback : -> HTTP::Headers, &received : Bytes, PlaceOS::Driver::Task | Nil -> Nil)
timeouts in seconds
Instance Method Summary
- #connect(connect_timeout : Int32 = 10) : Nil
- #disconnect : Nil
- #enable_multicast_loop(state = true)
- #http(method, path, body : HTTP::Client::BodyType = nil, params : Hash(String, String | Nil) | URI::Params = URI::Params.new, headers : Hash(String, String) | HTTP::Headers = HTTP::Headers.new, secure = false, concurrent = true) : HTTP::Client::Response
- #ping(message = nil)
- #pong(message = nil)
- #received : Slice(UInt8), PlaceOS::Driver::Task? -> Nil
- #received=(received : Slice(UInt8), Nil | PlaceOS::Driver::Task -> _)
- #send(message) : PlaceOS::Driver::TransportWebsocket
- #send(message, task : PlaceOS::Driver::Task, &block : Bytes, PlaceOS::Driver::Task -> Nil) : PlaceOS::Driver::TransportWebsocket
- #start_tls(verify_mode = OpenSSL::SSL::VerifyMode::NONE, context = @tls) : Nil
- #terminate : Nil
Instance methods inherited from class PlaceOS::Driver::Transport
before_request(&before_request : HTTP::Request -> )
before_request,
client_cert_file : String
client_cert_file,
connect(connect_timeout : Int32) : Nil
connect,
cookies : HTTP::Cookies
cookies,
disconnect : Nil
disconnect,
exec(message) : SSH2::Channel
exec,
http_uri_override : URI | Nil
http_uri_override,
http_uri_override=(http_uri_override : URI | Nil)
http_uri_override=,
logger(*args, **options)logger(*args, **options, &) logger, pre_processor : Bytes -> Bytes | Nil | Nil
pre_processor(&pre_processor : Bytes -> Bytes | Nil) pre_processor, pre_processor=(pre_processor : Bytes -> Bytes | Nil | Nil) pre_processor=, private_key_file : String private_key_file, proxy_in_use : String | Nil proxy_in_use, send(message) : PlaceOS::Driver::Transport
send(message, task : PlaceOS::Driver::Task, &_block : Bytes, PlaceOS::Driver::Task -> Nil) : PlaceOS::Driver::Transport send, start_tls(verify_mode : OpenSSL::SSL::VerifyMode, context : OpenSSL::SSL::Context) : Nil start_tls, terminate : Nil terminate, tokenizer : Tokenizer | Nil tokenizer, tokenizer=(tokenizer : Tokenizer | Nil) tokenizer=
Macros inherited from class PlaceOS::Driver::Transport
__build_http_helper__
__build_http_helper__
Constructor Detail
def self.new(queue : PlaceOS::Driver::Queue, uri : String, settings : PlaceOS::Driver::Settings, headers_callback : -> HTTP::Headers, &received : Bytes, PlaceOS::Driver::Task | Nil -> Nil)
#
timeouts in seconds
Instance Method Detail
def http(method, path, body : HTTP::Client::BodyType = nil, params : Hash(String, String | Nil) | URI::Params = URI::Params.new, headers : Hash(String, String) | HTTP::Headers = HTTP::Headers.new, secure = false, concurrent = true) : HTTP::Client::Response
#
def send(message, task : PlaceOS::Driver::Task, &block : Bytes, PlaceOS::Driver::Task -> Nil) : PlaceOS::Driver::TransportWebsocket
#