Method: RTunnel::SocketFactory.socket

Defined in:
lib/rtunnel/socket_factory.rb

.socket(options = {}) ⇒ Object



104
105
106
107
108
109
110
111
112
113
114
# File 'lib/rtunnel/socket_factory.rb', line 104

def self.socket(options = {})    
  s = new_socket options
  set_options s, options
  if inbound? options
    bind s, options    
    set_options_on_accept_sockets s, options
  else
    connect s, options
  end
  s
end