Class: RawJsonRpc::JSONTCPServer

Inherits:
GServer
  • Object
show all
Includes:
RawServerJsonRpc
Defined in:
lib/rawjsonrpc/server.rb

Overview

Implements the RawServerJsonRpcBase as GServer the stdlib SocketServer. For more information go one to the stdlib.

Instance Method Summary collapse

Methods included from RawServerJsonRpc

#add_block, #add_method

Instance Method Details

#serve(io) ⇒ Object



76
77
78
79
80
81
# File 'lib/rawjsonrpc/server.rb', line 76

def serve(io)
  loop do
    data = io.gets
    io.puts execute(data)
  end
end