Module: EventMachine

Defined in:
lib/oversip/ruby_ext/eventmachine.rb

Defined Under Namespace

Classes: Connection

Class Method Summary collapse

Class Method Details

.oversip_connect_tcp_server(bind_addr, server, port, klass, *args) ⇒ Object

Fast method for setting an outgoing TCP connection.



4
5
6
7
8
9
10
# File 'lib/oversip/ruby_ext/eventmachine.rb', line 4

def self.oversip_connect_tcp_server bind_addr, server, port, klass, *args
  s = bind_connect_server bind_addr, 0, server, port
  c = klass.new s, *args
  @conns[s] = c
  block_given? and yield c
  c
end