PlaceOS::Driver::TransportHTTP
Inherits PlaceOS::Driver::Transport < Reference < Object
Implement transport
Constructors
new(queue : PlaceOS::Driver::Queue, uri : String, settings : PlaceOS::Driver::Settings, &received : -> Nil)
timeouts in seconds
Instance methods
connect(connect_timeout : Int32 = 10) : Nil
Sourcedisconnect
Sourceenable_multicast_loop(state = true)
Implement transport
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 = false) : HTTP::Client::Response
ameba:disable Metrics/CyclomaticComplexity
received
Sourcereceived=(received : -> _)
Sourcesend(message) : TransportHTTP
Sourcesend(message, task : PlaceOS::Driver::Task, &_block : Bytes, PlaceOS::Driver::Task -> Nil) : TransportHTTP
Sourceterminate
Source