Class: EventMachine::Protocols::HeaderAndContentProtocol
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Connection
|
|
Instance Chain:
self,
LineText2 ,
Connection
|
|
Inherits: |
EventMachine::Connection
|
Defined in: | lib/em/protocols/header_and_content.rb |
Overview
Usage
class RequestHandler < EM::P::HeaderAndContentProtocol def receive_request headers, content p [:request, headers, content] end end
EM.run{ EM.start_server 'localhost', 80, RequestHandler }
Constant Summary
-
ContentLengthPattern =
# File 'lib/em/protocols/header_and_content.rb', line 49/Content-length:\s*(\d+)/i
LineText2
- Included
Class Method Summary
Connection
- Inherited
.new | Override .new so subclasses don't have to call super and can ignore connection-specific arguments. |
Instance Attribute Summary
Connection
- Inherited
#comm_inactivity_timeout | comm_inactivity_timeout returns the current value (float in seconds) of the inactivity-timeout property of network-connection and datagram-socket objects. |
#comm_inactivity_timeout= | Allows you to set the inactivity-timeout property for a network connection or datagram socket. |
#error? | Returns true if the connection is in an error state, false otherwise. |
#notify_readable= | Watches connection for readability. |
#notify_readable?, | |
#notify_writable= | Watches connection for writeability. |
#notify_writable? | Returns true if the connection is being watched for writability. |
#paused?, | |
#pending_connect_timeout | The duration after which a TCP connection in the connecting state will fail. |
#pending_connect_timeout= | Sets the duration after which a TCP connection in a connecting state will fail. |
#signature, #watch_only? |
Instance Method Summary
-
#headers_2_hash(hdrs)
Basically a convenience method.
- #receive_binary_data(text)
- #receive_line(line)
- #dispatch_request private
- #init_for_request private