Class: EventMachine::RTMP::SecureConnection

Inherits:
Connection
  • Object
show all
Defined in:
lib/em-rtmp/connection.rb

Overview

A secure connection behaves identically except that it delays the RTMP handshake until after the ssl handshake occurs.

Instance Attribute Summary

Attributes inherited from Connection

#channels, #chunk_size, #pending_requests, #state

Instance Method Summary collapse

Methods inherited from Connection

#begin_rtmp_handshake, #buffer_changed, #bytes_waiting, #change_state, #initialize, #on_disconnected, #on_handshake_complete, #on_ready, #read, #receive_data, #run_callbacks, #unbind, #write

Methods included from IOHelpers

#read_bitfield, #read_double_be, #read_int29, #read_safe, #read_uint16_be, #read_uint24_be, #read_uint32_be, #read_uint32_le, #read_uint8, #write_bitfield, #write_double_be, #write_int29, #write_uint16_be, #write_uint24_be, #write_uint32_be, #write_uint32_le, #write_uint8

Constructor Details

This class inherits a constructor from EventMachine::RTMP::Connection

Instance Method Details

#connection_completedObject

When the connection is established, make it secure before starting the RTMP handshake process.



173
174
175
176
# File 'lib/em-rtmp/connection.rb', line 173

def connection_completed
  Logger.info "connection completed, starting tls"
  start_tls verify_peer: false
end

#ssl_handshake_completedObject

Connection is now secure, issue the RTMP handshake challenge



179
180
181
182
# File 'lib/em-rtmp/connection.rb', line 179

def ssl_handshake_completed
  Logger.info "ssl handshake completed, issuing rtmp handshake"
  begin_rtmp_handshake
end