public ThalamusServerService(ClientsInterface bodyInterface, string clientAddress)
 {
     this.clients = bodyInterface;
     this.clientAddress = clientAddress;
 }
예제 #2
0
 public Character(ClientsInterface body) : this("UnspecifiedCharacter" + Counter++, body) { }
예제 #3
0
 public Character(string name, ClientsInterface body)
 {
     this.name = name;
     this.clients = body;
     this.LogToCSV = false;
 }
        public ThalamusClientProxy(ClientsInterface body, string name, string address, int fastPort, int slowPort, string clientId, int numSubscribedEvents)
        {
            this.name = name;
            this.fastPort = fastPort;
            this.slowPort = slowPort;
            this.address = address;
            this.characterClients = body;
            this.clientId = clientId;
			this.numSubscribedEvents = numSubscribedEvents;

            acceptSocketPermission.Union(connectSocketPermission).Demand();


            fastProxy = XmlRpcProxyGen.Create<IThalamusClientRpc>();
            fastProxy.Url = string.Format("http://{0}:{1}", address, fastPort);
            fastProxy.KeepAlive = true;
            fastProxy.Timeout = Properties.Settings.Default.FastTimeout;

			slowProxy = XmlRpcProxyGen.Create<IThalamusClientRpc>();
            slowProxy.Url = string.Format("http://{0}:{1}", address, slowPort);
			slowProxy.KeepAlive = true;
            slowProxy.Timeout = Properties.Settings.Default.SlowTimeout;
            //slowProxy = fastProxy;

            pingTimer.Interval = Properties.Settings.Default.PingInterval;
            pingTimer.Elapsed+=new ElapsedEventHandler(TimerPing);
            pingTimer.Start();

			sentMessageDispatcherThread = new Thread (new ThreadStart (SentMessageDispatcher));
			sentMessageDispatcherThread.Start ();
            receivedMessageDispatcherThread = new Thread(new ThreadStart(ReceivedMessageDispatcher));
            receivedMessageDispatcherThread.Start();
        }