Class: Caldecott::Client::HttpTunnel::Writer
- Inherits:
-
Object
- Object
- Caldecott::Client::HttpTunnel::Writer
- Defined in:
- lib/caldecott/client/http_tunnel.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(log, uri, conn, auth_token) ⇒ Writer
constructor
A new instance of Writer.
- #send_data(data) ⇒ Object
Constructor Details
#initialize(log, uri, conn, auth_token) ⇒ Writer
Returns a new instance of Writer.
180 181 182 183 184 |
# File 'lib/caldecott/client/http_tunnel.rb', line 180 def initialize(log, uri, conn, auth_token) @log, @uri, @conn, @auth_token = log, uri, conn, auth_token @seq, @write_buffer = 1, "" @closing = @writing = false end |
Instance Method Details
#close ⇒ Object
191 192 193 |
# File 'lib/caldecott/client/http_tunnel.rb', line 191 def close @closing = true end |
#send_data(data) ⇒ Object
186 187 188 189 |
# File 'lib/caldecott/client/http_tunnel.rb', line 186 def send_data(data) @write_buffer << data send_data_buffered unless @writing end |