Class: LiveConsole::IOMethods::UnixSocket

Inherits:
Object
  • Object
show all
Includes:
IOMethod
Defined in:
lib/live_console/io_methods/unix_socket/unix_socket.rb

Constant Summary collapse

DefaultOpts =
{
  :mode => 0600,
  :uid => Process.uid,
  :gid => Process.gid,
}
RequiredOpts =
DefaultOpts.keys + [:path]

Instance Method Summary collapse

Methods included from IOMethod

included, #missing_opts

Constructor Details

#initialize(opts) ⇒ UnixSocket

Returns a new instance of UnixSocket.



14
15
16
17
# File 'lib/live_console/io_methods/unix_socket/unix_socket.rb', line 14

def initialize(opts)
  super opts
  @server = UNIXServer.new path
end

Instance Method Details

#get_connectionObject



19
20
21
# File 'lib/live_console/io_methods/unix_socket/unix_socket.rb', line 19

def get_connection
  LiveConsole::IOMethods::UnixSocketConnection.new(@server,opts)
end