Sha256: 556ce92e3059c19d3efb3f1e887877b5a74d148f1579cfd198b3abc743d4fe40
Contents?: true
Size: 735 Bytes
Versions: 2
Compression:
Stored size: 735 Bytes
Contents
# encoding: utf-8 require "rubygems" $:.push("./lib") $:.unshift("./lib") require "qrpc/protocol/json-rpc" #require "json-rpc-objects/serializer/bson" require "json-rpc-objects/serializer/json" #require "json-rpc-objects/serializer/yaml" #require "json-rpc-objects/serializer/psych" #require "json-rpc-objects/serializer/marshal" require "json-rpc-objects/serializer/msgpack" class Foo def subtract(x, y) x - y + 5 end end require "qrpc/server" require "qrpc/locator/em-jack" serializer = JsonRpcObjects::Serializer::JSON::new protocol = QRPC::Protocol::JsonRpc::new(:serializer => serializer) server = QRPC::Server::new(Foo::new, :synchronous, protocol) server.listen! QRPC::Locator::EMJackLocator::new("test")
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
qrpc-0.9.1 | test-server.rb |
qrpc-0.9.0 | test-server.rb |