Beispiel #1
0
 public TextureSender(IDownloader downloader, GriderProxy _proxy, int discardLevel, uint packetNumber)
 {
     proxy = _proxy;
     RequestedDiscardLevel = discardLevel;
     StartPacketNumber = packetNumber;
     m_downloader = downloader;
 }
Beispiel #2
0
        public InventoryClient(GriderProxy sp, UUID id, string key, string i, string a, string ak)
        {
            proxy = sp;
            UserID = id;
            AuthKey = key;
            InventoryServerURL = i.Trim('/');
            AssetServerURL = a;
            AssetServerKey = ak;

            // Let's connect to inventory, so that it establishes a cap url for us
            Console.WriteLine("[InventoryClient]: Calling inventory for caps with key " + AuthKey);
            connected = OpenSimComms.CreateInventoryHandlers(InventoryServerURL, UserID, AuthKey, out CapsHandlers);
            if (!connected)
                Console.WriteLine("[InventoryClient]: Unable to connect to inventory service");

            Uri uri = null;
            if (Uri.TryCreate(AuthKey, UriKind.Absolute, out uri))
            {
                try
                {
                    AuthToken = uri.PathAndQuery.Trim('/');
                }
                catch { }
            }

            // Get the entire inventory
            GetInventory();

            assDownloader = new AssetDownloader(InventoryServerURL + "/" + AuthToken, this);
        }
Beispiel #3
0
 public AssetSender(GriderProxy _proxy, UUID _assetID, UUID _transferID, byte[] _params, byte _source)
 {
     proxy = _proxy;
     assetID = _assetID;
     transferID = _transferID;
     Params = _params;
     source = _source;
 }
Beispiel #4
0
        public RegionClient(GriderProxy p, string regionurl, string auth)
        {
            proxy = p;
            RegionURL = regionurl;
            AuthToken = auth;
            //assDownloader = new AssetDownloader(RegionURL, this);

            m_RegionAssetService = new AssetServicesConnector(RegionURL);
        }
Beispiel #5
0
 public RegionClient(GriderProxy p, string regionurl, string auth)
 {
     proxy = p;
     RegionURL = regionurl;
     AuthToken = auth;
     //assDownloader = new AssetDownloader(RegionURL, this);
     assClient = new GridAssetClient(RegionURL);
     assClient.SetReceiver(this);
 }
Beispiel #6
0
        public GriderProxyFrame(string[] args)
        {
            //bool externalPlugin = false;
            this.args = args;

            GriderProxyConfig proxyConfig = new GriderProxyConfig("GridSurferProxy", "Crista Lopes / Diva", args);
            proxy = new GriderProxy(proxyConfig);

            // add delegates for login
            proxy.SetLoginRequestDelegate(new XmlRpcRequestDelegate(LoginRequest));
            proxy.SetLoginResponseDelegate(new XmlRpcResponseDelegate(LoginResponse));

            // add a delegate for outgoing chat
            proxy.AddDelegate(PacketType.ChatFromViewer, Direction.Outgoing, new PacketDelegate(ChatFromViewerOut));

            //  handle command line arguments
            foreach (string arg in args)
                if (arg == "--log-login")
                    logLogin = true;
                else if (arg.Substring(0, 2) == "--")
                {
                    int ipos = arg.IndexOf("=");
                    if (ipos != -1)
                    {
                        string sw = arg.Substring(0, ipos);
                        string val = arg.Substring(ipos + 1);
                        Console.WriteLine("arg '" + sw + "' val '" + val + "'");
                        if (sw == "--load")
                        {
                            //externalPlugin = true;
                            LoadPlugin(val);
                        }
                    }
                }

            commandDelegates["/load"] = new CommandDelegate(CmdLoad);
        }
Beispiel #7
0
 // SimProxy: construct a proxy for a single simulator
 public SimProxy(GriderProxyConfig proxyConfig, IPEndPoint simEndPoint, GriderProxy proxy)
 {
     //this.proxyConfig = proxyConfig;
     remoteEndPoint = new IPEndPoint(simEndPoint.Address, simEndPoint.Port);
     this.proxy = proxy;
     socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
     socket.Bind(new IPEndPoint(proxyConfig.clientFacingAddress, 0));
     proxy.AddHandler(remoteEndPoint, this);
     Reset();
 }
Beispiel #8
0
 public static void SetUserData(GriderProxy p, string userURL, string inventoryURL, string assetURL, string assetKey, UUID token)
 {
     proxy = p;
     UserServerURL = userURL;
     InventoryServerURL = inventoryURL;
     AssetServerURL = assetURL;
     AssetServerSendKey = assetKey;
     AuthToken = token;
 }
Beispiel #9
0
 public AssetReceiver(GriderProxy _proxy, UUID _id, UUID _transfer)
 {
     proxy = _proxy;
     assetID = _id;
     transferID = _transfer;
 }
Beispiel #10
0
 public Grider(GriderProxyFrame frame, Process viewer)
 {
     this.frame = frame;
     this.proxy = frame.proxy;
     this.Viewer = viewer;
 }