Module: EventMachine::Wssh::Server
- Extended by:
- Service
- Defined in:
- lib/em/wssh/server.rb
Defined Under Namespace
Modules: Ssh
Classes: Req
Constant Summary
collapse
- Title =
'WSSH daemon redirects Websocket to sshd'
- Need =
%w(yaml em-websocket)
Instance Attribute Summary
Attributes included from Service
#options
Class Method Summary
collapse
Methods included from Service
daemonize!, daemonize?, getopt, go!, helptions, homebase, log, loop!, mkdir, path, pid
Class Method Details
.help ⇒ Object
20
21
22
23
24
25
26
27
28
|
# File 'lib/em/wssh/server.rb', line 20
def self.help
require_relative 'exe'
puts <<-EOF
Proxy ssh connection through websocket
#{Exe.usage} [options...]
EOF
helptions
end
|
.listen! ⇒ Object
162
163
164
165
166
|
# File 'lib/em/wssh/server.rb', line 162
def self.listen!
EM::WebSocket.run host: options[:host], port: options[:port] do |ws|
Req.new ws
end
end
|