Exemplo n.º 1
0
 // ProxySim: return the proxy for the specified sim, creating it if it doesn't exist
 private IPEndPoint ProxySim(IPEndPoint simEndPoint)
 {
     if (proxyEndPoints.ContainsKey(simEndPoint))
         // return the existing proxy
         return (IPEndPoint)proxyEndPoints[simEndPoint];
     else
     {
         // return a new proxy
         SimProxy simProxy = new SimProxy(proxyConfig, simEndPoint, this);
         IPEndPoint fakeSim = simProxy.LocalEndPoint();
         OpenMetaverse.Logger.Log("Creating proxy for " + simEndPoint + " at " + fakeSim, Helpers.LogLevel.Info);
         simProxy.Run();
         proxyEndPoints.Add(simEndPoint, fakeSim);
         simProxies.Add(simEndPoint, simProxy);
         return fakeSim;
     }
 }
Exemplo n.º 2
0
 // AddHandler: remember which sim proxy corresponds to a given sim
 private void AddHandler(EndPoint endPoint, SimProxy proxy)
 {
     proxyHandlers.Add(endPoint, proxy);
 }
Exemplo n.º 3
0
 // ProxySim: return the proxy for the specified sim, creating it if it doesn't exist
 private IPEndPoint ProxySim(IPEndPoint simEndPoint)
 {
     if (proxyEndPoints.ContainsKey(simEndPoint))
         // return the existing proxy
         return (IPEndPoint)proxyEndPoints[simEndPoint];
     else
     {
         // return a new proxy
         SimProxy simProxy = new SimProxy(proxyConfig, simEndPoint, this);
         IPEndPoint fakeSim = simProxy.LocalEndPoint();
         Log("creating proxy for " + simEndPoint + " at " + fakeSim, false);
         simProxy.Run();
         proxyEndPoints.Add(simEndPoint, fakeSim);
         simProxies.Add(simEndPoint, simProxy);
         return fakeSim;
     }
 }