class Palta::Client
Attributes
host[R]
port[R]
Public Class Methods
new(host="localhost", port=8888)
click to toggle source
# File lib/palta/client.rb, line 11 def initialize host="localhost", port=8888 @host = host @port = port end
Public Instance Methods
send(data)
click to toggle source
# File lib/palta/client.rb, line 16 def send data TCPSocket.open @host, @port do |s| s.send data.to_json, 0 end end