Inheritance: RpcMessageDispatcher.Client
Exemple #1
0
        public RpcAdapter createAdapter(string id)
        {
            RpcAdapter adapter = new RpcAdapter(id);

            addAdatper(adapter);
            return(adapter);
        }
Exemple #2
0
 public void addAdatper(RpcAdapter adapter)
 {
     if (_adapters.ContainsKey(adapter.id)){
         return;
     }
     _adapters.Add(adapter.id, adapter);
 }
Exemple #3
0
 public void addAdatper(RpcAdapter adapter)
 {
     if (_adapters.ContainsKey(adapter.id))
     {
         return;
     }
     _adapters.Add(adapter.id, adapter);
 }
Exemple #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;
 }
Exemple #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);
        }
Exemple #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);
     }
 }
Exemple #7
0
 protected RpcConnection(RpcAdapter adapter = null)
 {
     this.adapter = adapter;
     RpcCommunicator.instance().registerConnection(this);
 }
Exemple #8
0
 public RpcAdapter createAdapter(string id)
 {
     RpcAdapter adapter = new RpcAdapter(id);
     addAdatper(adapter);
     return adapter;
 }
Exemple #9
0
 protected RpcConnection(RpcAdapter adapter = null)
 {
     this.adapter = adapter;
     RpcCommunicator.instance().registerConnection(this);
 }
Exemple #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);
     }
 }