Method: EventMachine::MySQLConnection#initialize
- Defined in:
- lib/em-mysqlplus/connection.rb
#initialize(mysql, opts, conn) ⇒ MySQLConnection
Returns a new instance of MySQLConnection.
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/em-mysqlplus/connection.rb', line 22 def initialize(mysql, opts, conn) @conn = conn @mysql = mysql @fd = mysql.socket @opts = opts @current = nil @queue = [] @processing = false @connected = true self.notify_readable = true EM.add_timer(0){ next_query } end |