Class: Thin::Glazed::HttpGlazing
- Inherits:
-
EventMachine::Connection
- Object
- EventMachine::Connection
- Thin::Glazed::HttpGlazing
- Defined in:
- lib/thin/glazed/http_glazing.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#client_port ⇒ Object
readonly
Returns the value of attribute client_port.
Instance Method Summary collapse
-
#initialize(client_port) ⇒ HttpGlazing
constructor
A new instance of HttpGlazing.
- #receive_data(data) ⇒ Object
- #relay_from_client(data) ⇒ Object
- #unbind ⇒ Object
- #unbind_client ⇒ Object
Constructor Details
#initialize(client_port) ⇒ HttpGlazing
Returns a new instance of HttpGlazing.
4 5 6 |
# File 'lib/thin/glazed/http_glazing.rb', line 4 def initialize(client_port) @client_port = client_port end |
Instance Attribute Details
#client_port ⇒ Object (readonly)
Returns the value of attribute client_port.
2 3 4 |
# File 'lib/thin/glazed/http_glazing.rb', line 2 def client_port @client_port end |
Instance Method Details
#receive_data(data) ⇒ Object
8 9 10 |
# File 'lib/thin/glazed/http_glazing.rb', line 8 def receive_data(data) client.send_data data unless data.nil? end |
#relay_from_client(data) ⇒ Object
12 13 14 |
# File 'lib/thin/glazed/http_glazing.rb', line 12 def relay_from_client(data) send_data data unless data.nil? end |
#unbind ⇒ Object
16 17 18 19 |
# File 'lib/thin/glazed/http_glazing.rb', line 16 def unbind client.close_connection @client = nil end |
#unbind_client ⇒ Object
21 22 23 24 |
# File 'lib/thin/glazed/http_glazing.rb', line 21 def unbind_client close_connection_after_writing @client = nil end |