public RefServer() { int tcpPort = Convert.ToInt32(ConfigurationManager.AppSettings["refServerPort"].ToString()); tcpListener = new TCPListener(tcpPort); tcpListener.onMessage += TcpListener_onMessage; tcpListener.StartListen(); dc = new DispatcherClient(MetaData.Roles.server); dc.onFound += dispFound; dc.StartListen(); }
public CacheServer() { dc = new DispatcherClient(MetaData.Roles.cache); dc.onFound += dispFound; dc.StartListen(); if (!Directory.Exists(CachedFile.CacheFolder)) { Directory.CreateDirectory(CachedFile.CacheFolder); } string msmqName = ConfigurationManager.AppSettings["cacheMSMQName"]; msmqListener = new MSMQListener(msmqName); msmqListener.onMessage += MsmqListener_onMessage; msmqListener.StartListen(); }