Class: UV::InboundConnection
- Inherits:
-
TcpConnection
- Object
- Connection
- TcpConnection
- UV::InboundConnection
- Defined in:
- lib/uv-rays/connection.rb
Instance Attribute Summary
Attributes inherited from Connection
Instance Method Summary collapse
-
#initialize(tcp) ⇒ InboundConnection
constructor
A new instance of InboundConnection.
- #use_tls(args = {}) ⇒ Object
Methods inherited from TcpConnection
#close_connection, #keepalive, #on_close, #on_connect, #stream_file, #write
Methods inherited from Connection
#close_connection, #on_read, #pause, #paused?, #post_init, #resume
Constructor Details
#initialize(tcp) ⇒ InboundConnection
Returns a new instance of InboundConnection.
105 106 107 108 109 110 111 112 |
# File 'lib/uv-rays/connection.rb', line 105 def initialize(tcp) super() @reactor = tcp.reactor @transport = tcp @transport.finally method(:on_close) @transport.progress method(:on_read) end |
Instance Method Details
#use_tls(args = {}) ⇒ Object
114 115 116 117 118 119 120 121 122 |
# File 'lib/uv-rays/connection.rb', line 114 def use_tls(args = {}) args[:server] = true if @transport.connected @transport.start_tls(args) else @using_tls = args end end |