Module: EMRPC

Defined in:
lib/emrpc/client.rb,
lib/emrpc/server.rb,
lib/emrpc/console.rb,
lib/emrpc/version.rb,
lib/emrpc/util/codec.rb,
lib/emrpc/util/em2rev.rb,
lib/emrpc/util/timers.rb,
lib/emrpc/archive/ring.rb,
lib/emrpc/evented_api/pid.rb,
lib/emrpc/util/blank_slate.rb,
lib/emrpc/evented_api/timer.rb,
lib/emrpc/util/combine_modules.rb,
lib/emrpc/evented_api/remote_pid.rb,
lib/emrpc/archive/reference_savior.rb,
lib/emrpc/evented_api/subscribable.rb,
lib/emrpc/blocking_api/method_proxy.rb,
lib/emrpc/protocols/marshal_protocol.rb,
lib/emrpc/evented_api/evented_wrapper.rb,
lib/emrpc/evented_api/protocol_mapper.rb,
lib/emrpc/evented_api/connection_mixin.rb,
lib/emrpc/evented_api/debug_connection.rb,
lib/emrpc/evented_api/local_connection.rb,
lib/emrpc/evented_api/reconnecting_pid.rb,
lib/emrpc/evented_api/default_callbacks.rb,
lib/emrpc/evented_api/remote_connection.rb,
lib/emrpc/evented_api/debug_pid_callbacks.rb,
lib/emrpc/protocols/fast_message_protocol.rb,
lib/emrpc/blocking_api/multithreaded_client.rb,
lib/emrpc/blocking_api/singlethreaded_client.rb

Defined Under Namespace

Modules: ConnectionMixin, Console, DebugConnection, DebugPidCallbacks, DefaultCallbacks, Em2Rev, FastMessageProtocol, MarshalProtocol, PassThruCodec, Pid, PidVariables, ProtocolMapper, RemoteConnection, Ring, SinglethreadedClient, Subscribable, Timers, Util Classes: Client, EventedWrapper, LocalConnection, MethodProxy, MultithreadedClient, PoolTimeout, ReconnectingPid, ReferenceSavior, RemotePid, Server, StaleReference, Timer

Constant Summary collapse

VERSION =
"0.3"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.__1234_const_missing(c) ⇒ Object



6
# File 'lib/emrpc/util/blank_slate.rb', line 6

alias_method :__1234_const_missing, :const_missing

.BlankSlateObject

We cannot define a static class since new methods can be added to the Object in the runtime. Thus, we create a blank slate class every time user needs it, regardless what methods vere added to the ruby core before.



20
21
22
23
24
# File 'lib/emrpc/util/blank_slate.rb', line 20

def self.BlankSlate
  Class.new do
    instance_methods.each { |m| undef_method m unless m =~ /^__/ }
  end
end

.const_missing(c) ⇒ Object



12
13
14
15
# File 'lib/emrpc/util/blank_slate.rb', line 12

def self.const_missing(c)
  return BlankSlate() if c == :BlankSlate
  __1234_const_missing(c)
end

Instance Method Details

#Em2Rev(em_protocol) ⇒ Object

call-seq:

Em2Rev(MyEventMachineProtocol) -> Rev::TCPSocket

Returns a Rev::TCPSocket subclass with protocol module and adapter module (Em2Rev) included.



7
8
9
# File 'lib/emrpc/util/em2rev.rb', line 7

def Em2Rev(em_protocol)
  Em2Rev.wrap(em_protocol)
end