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(); }
public CSListener(IAppListener appListener) { this.appListener = appListener; }
/* * 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; }