class Ethereum::Connection
Attributes
ipcpath[RW]
Public Class Methods
new(ipcpath)
click to toggle source
Calls superclass method
Ethereum::Client::new
# File lib/elchapo/ethereum/connection.rb, line 6 def initialize(ipcpath) super() @ipcpath = ipcpath end
Public Instance Methods
send_single(payload)
click to toggle source
# File lib/elchapo/ethereum/connection.rb, line 11 def send_single(payload) socket = UNIXSocket.new(@ipcpath) socket.puts(payload) read = socket.recvmsg(nil)[0] socket.close return read end