Ejemplo n.º 1
0
 public RpcServer(RpcServerConfig config, ILoger loger)
     : base(config, loger)
 {
     rpcConfig = config;
     rpcContainer = new RpcContainer<IServerController>();
     RpcFactory = new ProxyFactory(config);
 }
Ejemplo 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);
        }
Ejemplo n.º 3
0
 public RpcServer(RpcServerConfig config, ILoger loger) : base(config, loger)
 {
     rpcConfig    = config;
     rpcContainer = new RpcContainer <IServerController>();
     RpcFactory   = new ProxyFactory(config);
 }