Parent

Class Index [+]

Quicksearch

MessagePack::RPC::Responder

Public Class Methods

new(sendable, msgid) click to toggle source
     # File lib/msgpack/rpc/server.rb, line 161
161:         def initialize(sendable, msgid)
162:                 @sendable = sendable  # send_message method is required
163:                 @msgid = msgid
164:                 @sent = false
165:         end

Public Instance Methods

error(err, retval = nil) click to toggle source
     # File lib/msgpack/rpc/server.rb, line 180
180:         def error(err, retval = nil)
181:                 result(retval, err)
182:         end
result(retval, err = nil) click to toggle source
     # File lib/msgpack/rpc/server.rb, line 171
171:         def result(retval, err = nil)
172:                 unless @sent
173:                         data = [RESPONSE, @msgid, err, retval].to_msgpack
174:                         @sendable.send_data(data)
175:                         @sent = true
176:                 end
177:                 nil
178:         end
sent?() click to toggle source
     # File lib/msgpack/rpc/server.rb, line 167
167:         def sent?
168:                 @sent
169:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.