Ejemplo n.º 1
0
 public ServerCallback(Server server)
 {
     Server = server;
 }
Ejemplo n.º 2
0
 private void CompleteConnection(Ice.Connection connection, Ice.ObjectPrx proxy)
 {
     if (!App.Current.Dispatcher.CheckAccess()) {
         App.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)(() => CompleteConnection(connection, proxy)));
         return;
     }
     var localAddress = (connection.getInfo() as Ice.TCPConnectionInfo).localAddress;
     var clientEndpoint = String.Format("tcp -h {0} -t 1000", localAddress);
     Proxy = Murmur.MetaPrxHelper.checkedCast(proxy);
     ConnectionAttempt = null;
     try {
         foreach (var serverProxy in Proxy.getBootedServers()) {
             var server = new Server(IceCommunicator, clientEndpoint, serverProxy, Name);
             Servers.Add(server);
         }
     } catch (Ice.Exception e) {
         System.Diagnostics.Debug.WriteLine("Error talking to {0}: {1}", Name, e.ToString());
         Proxy = null;
     }
 }