Class: ConnectionThread
- Inherits:
-
Thread
- Object
- Thread
- ConnectionThread
- Defined in:
- lib/jsonrpc2.0-tcp/ConnectionThread.rb
Instance Attribute Summary collapse
-
#loginMethod ⇒ Object
Returns the value of attribute loginMethod.
-
#restrict ⇒ Object
readonly
Returns the value of attribute restrict.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
Instance Attribute Details
#loginMethod ⇒ Object
Returns the value of attribute loginMethod.
2 3 4 |
# File 'lib/jsonrpc2.0-tcp/ConnectionThread.rb', line 2 def loginMethod @loginMethod end |
#restrict ⇒ Object (readonly)
Returns the value of attribute restrict.
3 4 5 |
# File 'lib/jsonrpc2.0-tcp/ConnectionThread.rb', line 3 def restrict @restrict end |
#timeout ⇒ Object
Returns the value of attribute timeout.
2 3 4 |
# File 'lib/jsonrpc2.0-tcp/ConnectionThread.rb', line 2 def timeout @timeout end |
Instance Method Details
#login ⇒ Object
10 11 12 |
# File 'lib/jsonrpc2.0-tcp/ConnectionThread.rb', line 10 def login @restrict = nil end |
#start_timeout(timeout) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/jsonrpc2.0-tcp/ConnectionThread.rb', line 14 def start_timeout(timeout) @timeoutThread.exit unless @timeoutThread == nil @timeoutThread = Thread.start(self, timeout) do |thread, timeout| sleep timeout thread.exit end end |
#stop_timeout ⇒ Object
23 24 25 26 27 28 |
# File 'lib/jsonrpc2.0-tcp/ConnectionThread.rb', line 23 def stop_timeout unless @timeoutThread == nil @timeoutThread.exit @timeoutThread = nil end end |