Sha256: f1988c695be42983188dda23a46564f0753d3c9f5e92fd5bd4709c9b959caa89
Contents?: true
Size: 1011 Bytes
Versions: 1
Compression:
Stored size: 1011 Bytes
Contents
require 'drb' module Vedeu module Distributed # @example # client = Vedeu::Distributed::Client.new("druby://localhost:21420") # client.input('a') # client.output # => 'some content...' # client.stop # class Client # @param uri [String] # @return [Client] def initialize(uri) @uri = uri.to_s end # @param data [String|Symbol] # @return [] def input(data) server.input(data) end alias_method :read, :input # @return [] def output server.output end alias_method :write, :output # @return [] def start # client should be able to start a server, but what if one already # exists? end # @return [] def stop server.stop end private attr_reader :uri # @return [] def server @server ||= DRbObject.new_with_uri(uri) end end # Client end # Distributed end # Vedeu
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.3.4 | lib/vedeu/distributed/client.rb |