Class: RawJsonRpc::ClientSock

Inherits:
RawClientJsonRpc show all
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

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

#closeObject

closes the socket connection



100
101
102
# File 'lib/rawjsonrpc/client.rb', line 100

def close
  @socket.close
end