Class: Nonnative::ChaosProxy
- Inherits:
-
Proxy
- Object
- Proxy
- Nonnative::ChaosProxy
show all
- Defined in:
- lib/nonnative/chaos_proxy.rb
Instance Method Summary
collapse
Methods inherited from Proxy
#initialize
Instance Method Details
#port ⇒ Object
15
16
17
|
# File 'lib/nonnative/chaos_proxy.rb', line 15
def port
service.proxy.port
end
|
#start ⇒ Object
5
6
7
8
|
# File 'lib/nonnative/chaos_proxy.rb', line 5
def start
@tcp_server = ::TCPServer.new('0.0.0.0', service.port)
@thread = Thread.new { perform_start }
end
|
#stop ⇒ Object
10
11
12
13
|
# File 'lib/nonnative/chaos_proxy.rb', line 10
def stop
thread.terminate
tcp_server.close
end
|