Наследование: RpcMessageDispatcher.Client
Пример #1
0
        public RpcAdapter createAdapter(string id)
        {
            RpcAdapter adapter = new RpcAdapter(id);

            addAdatper(adapter);
            return(adapter);
        }
Пример #2
0
 public void addAdatper(RpcAdapter adapter)
 {
     if (_adapters.ContainsKey(adapter.id)){
         return;
     }
     _adapters.Add(adapter.id, adapter);
 }
Пример #3
0
 public void addAdatper(RpcAdapter adapter)
 {
     if (_adapters.ContainsKey(adapter.id))
     {
         return;
     }
     _adapters.Add(adapter.id, adapter);
 }
Пример #4
0
 public RpcAdapter createAdapterWithProxy(String id, RpcProxyBase proxy)
 {
     RpcAdapter adapter = null;
     adapter = new RpcAdapter(id);
     proxy.conn.adapter = adapter;
     //		adapter.addConnection(proxy.conn);
     addAdatper(adapter);
     return adapter;
 }
Пример #5
0
        public RpcAdapter createAdapterWithProxy(String id, RpcProxyBase proxy)
        {
            RpcAdapter adapter = null;

            adapter            = new RpcAdapter(id);
            proxy.conn.adapter = adapter;
            //		adapter.addConnection(proxy.conn);
            addAdatper(adapter);
            return(adapter);
        }
Пример #6
0
 protected virtual void onMessage(RpcMessage m)
 {
     if (_adapter == null && _acceptor != null && _acceptor.adapter != null) // the connection from acceptor
     {
         _adapter = _acceptor.adapter;
     }
     if (_adapter != null && _adapter.dispatcher != null)  //由adapter的线程执行
     {
         _adapter.dispatcher.dispatchMsg(m);
     }
     else   //由全局通信器进行调度执行
     {
         RpcCommunicator.instance().dispatchMsg(m);
     }
 }
Пример #7
0
 protected RpcConnection(RpcAdapter adapter = null)
 {
     this.adapter = adapter;
     RpcCommunicator.instance().registerConnection(this);
 }
Пример #8
0
 public RpcAdapter createAdapter(string id)
 {
     RpcAdapter adapter = new RpcAdapter(id);
     addAdatper(adapter);
     return adapter;
 }
Пример #9
0
 protected RpcConnection(RpcAdapter adapter = null)
 {
     this.adapter = adapter;
     RpcCommunicator.instance().registerConnection(this);
 }
Пример #10
0
 protected virtual void onMessage(RpcMessage m)
 {
     if ( _adapter == null &&_acceptor != null && _acceptor.adapter!=null) { // the connection from acceptor
         _adapter = _acceptor.adapter;
     }
     if (_adapter != null &&  _adapter.dispatcher!=null) { //由adapter的线程执行
         _adapter.dispatcher.dispatchMsg(m);
     }
     else { //由全局通信器进行调度执行
         RpcCommunicator.instance().dispatchMsg(m);
     }
 }