Esempio n. 1
0
        private void Init(Type serviceType)
        {
            _serviceContract = serviceType.GetCustomAttribute <ServiceContractAttribute>();
            if (_serviceContract == null)
            {
                throw new ArgumentException("serviceType not exists ServiceContractAttribute");
            }

            _kvListener  = new ConcurrentDictionary <Guid, IClientSessionListener>();
            _appListener = new AppListenerImpl();
            _appListener.Initialize();
        }
Esempio n. 2
0
 public CSListener(IAppListener appListener)
 {
     this.appListener = appListener;
 }
Esempio n. 3
0
 /*
  * Add an application listener to server, used to forward non-library internals events
  */
 public void SetListeners(IAppListener appListener, IGameListener gameListener)
 {
     ssManager         = new NetManager(new SSListener());
     csManager         = new NetManager(new CSListener(appListener));
     this.gameListener = gameListener;
 }