Class: RawJsonRpc::ClientSock
- Inherits:
-
RawClientJsonRpc
- Object
- RawClientJsonRpc
- RawJsonRpc::ClientSock
- Defined in:
- lib/rawjsonrpc/client.rb
Overview
Implements the raw json rpc client over a tcp socket. Includes the RawClientJsonRpcBase Module
Instance Method Summary collapse
-
#close ⇒ Object
closes the socket connection.
-
#initialize(ip, port) ⇒ ClientSock
constructor
Init the socket with host.
Methods inherited from RawClientJsonRpc
#method_missing, #notification, #request
Constructor Details
#initialize(ip, port) ⇒ ClientSock
Init the socket with host.
96 97 98 |
# File 'lib/rawjsonrpc/client.rb', line 96 def initialize(ip, port) @socket = TCPSocket.new(ip, port) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RawJsonRpc::RawClientJsonRpc
Instance Method Details
#close ⇒ Object
closes the socket connection
100 101 102 |
# File 'lib/rawjsonrpc/client.rb', line 100 def close @socket.close end |