Esempio n. 1
0
 public RpcServer(RpcServerConfig config, ILoger loger)
     : base(config, loger)
 {
     rpcConfig = config;
     rpcContainer = new RpcContainer<IServerController>();
     RpcFactory = new ProxyFactory(config);
 }
Esempio n. 2
0
        public static RpcProxy GetProxy <T>(this ITcpSession session, string impName = null) where T : class
        {
            if (session == null)
            {
                throw new Exception("session Can't be empty");
            }
            if (string.IsNullOrEmpty(impName))
            {
                impName = typeof(T).Name;
            }
            var          proxy = new RpcProxy(typeof(T), impName);
            ProxyFactory fac   = session.SessionData.Get("proxyfactory") as ProxyFactory;

            proxy.RpcInvoke = fac.GetInvoke(session.SessionId);
            return(proxy);
        }
Esempio n. 3
0
 public RpcServer(RpcServerConfig config, ILoger loger) : base(config, loger)
 {
     rpcConfig    = config;
     rpcContainer = new RpcContainer <IServerController>();
     RpcFactory   = new ProxyFactory(config);
 }