class Rbuv::EM::Connection
Public Class Methods
new(sig, *args)
click to toggle source
# File lib/rbuv/em/connection.rb, line 5 def self.new(sig, *args) allocate.instance_eval do @signature = sig initialize(*args) post_init self end end
new(*args)
click to toggle source
# File lib/rbuv/em/connection.rb, line 17 def initialize(*args) end
Public Instance Methods
close_connection(after_writing=false)
click to toggle source
# File lib/rbuv/em/connection.rb, line 37 def close_connection(after_writing=false) EM.close_connection @signature, after_writing end
connection_completed()
click to toggle source
# File lib/rbuv/em/connection.rb, line 41 def connection_completed end
post_init()
click to toggle source
# File lib/rbuv/em/connection.rb, line 20 def post_init end
receive_data(data)
click to toggle source
# File lib/rbuv/em/connection.rb, line 23 def receive_data(data) puts "............>>>#{data.length}" end
send_data(data)
click to toggle source
# File lib/rbuv/em/connection.rb, line 30 def send_data(data) data = data.to_s size = data.bytesize if data.respond_to?(:bytesize) size ||= data.size EM.send_data @signature, data, size end
unbind()
click to toggle source
# File lib/rbuv/em/connection.rb, line 27 def unbind end