コード例 #1
0
    public static void WWWFormWWWRequest(this WebRequest wwwUtil, string url, WWWForm form, DownLoadFinish finish, DownLoadError error = null)
    {
        FormWWWItem item = WWWItemPool.GetWWWItem <FormWWWItem>();

        if (item == null)
        {
            item = new FormWWWItem();
            WWWItemPool.AddWWWItem(item);
        }

        item.SetValue(url, form);
        item.downloadFinish = finish;
        item.downloadError  = error;

        wwwUtil.AddTask(item);
    }
コード例 #2
0
    public static void GetByteRequest(this WebRequest wwwUtil, string url, DownLoadData data, DownLoadError error = null)
    {
        GetWWWItem item = WWWItemPool.GetWWWItem <GetWWWItem>();

        if (item == null)
        {
            item = new GetWWWItem();
            WWWItemPool.AddWWWItem(item);
        }

        item.SetValue(url);
        item.downloadData  = data;
        item.downloadError = error;

        wwwUtil.AddTask(item);
    }
コード例 #3
0
    public static void PostWWWRequest(this WebRequest wwwUtil, string url, byte[] postData, DownLoadFinish finish, DownLoadError error = null)
    {
        PostWWWItem item = WWWItemPool.GetWWWItem <PostWWWItem>();

        if (item == null)
        {
            item = new PostWWWItem();
            WWWItemPool.AddWWWItem(item);
        }

        item.SetValue(url, postData);
        item.downloadFinish = finish;
        item.downloadError  = error;

        wwwUtil.AddTask(item);
    }
コード例 #4
0
    public static void WWWFormByteRequest(this WebRequest wwwUtil, string url, WWWForm form, DownLoadProgress progress, DownLoadData data, DownLoadError error = null)
    {
        FormWWWItem item = WWWItemPool.GetWWWItem <FormWWWItem>();

        if (item == null)
        {
            item = new FormWWWItem();
            WWWItemPool.AddWWWItem(item);
        }

        item.SetValue(url, form);
        item.downloadProgress = progress;
        item.downloadData     = data;
        item.downloadError    = error;

        wwwUtil.AddTask(item);
    }
コード例 #5
0
    public static void GetStringRequest(this WebRequest wwwUtil, string url, DownLoadProgress progress, DownLoadText text, DownLoadError error = null)
    {
        GetWWWItem item = WWWItemPool.GetWWWItem <GetWWWItem>();

        if (item == null)
        {
            item = new GetWWWItem();
            WWWItemPool.AddWWWItem(item);
        }

        item.SetValue(url);
        item.downloadProgress = progress;
        item.downloadText     = text;
        item.downloadError    = error;

        wwwUtil.AddTask(item);
    }
コード例 #6
0
    public static void WWWFormStringRequest(this WebRequest wwwUtil, string url, WWWForm form, BeginDownLoad begin, DownLoadText text, DownLoadError error = null)
    {
        FormWWWItem item = WWWItemPool.GetWWWItem <FormWWWItem>();

        if (item == null)
        {
            item = new FormWWWItem();
            WWWItemPool.AddWWWItem(item);
        }

        item.SetValue(url, form);
        item.beginDownload = begin;
        item.downloadText  = text;
        item.downloadError = error;

        wwwUtil.AddTask(item);
    }
コード例 #7
0
    public static void PostByteRequest(this WebRequest wwwUtil, string url, byte[] postData, DownLoadProgress progress, DownLoadData data, DownLoadError error = null)
    {
        PostWWWItem item = WWWItemPool.GetWWWItem <PostWWWItem>();

        if (item == null)
        {
            item = new PostWWWItem();
            WWWItemPool.AddWWWItem(item);
        }

        item.SetValue(url, postData);
        item.downloadProgress = progress;
        item.downloadData     = data;
        item.downloadError    = error;

        wwwUtil.AddTask(item);
    }
コード例 #8
0
    public static void PostStringRequest(this WebRequest wwwUtil, string url, byte[] postData, BeginDownLoad begin, DownLoadText text, DownLoadError error = null)
    {
        PostWWWItem item = WWWItemPool.GetWWWItem <PostWWWItem>();

        if (item == null)
        {
            item = new PostWWWItem();
            WWWItemPool.AddWWWItem(item);
        }

        item.SetValue(url, postData);
        item.beginDownload = begin;
        item.downloadText  = text;
        item.downloadError = error;

        wwwUtil.AddTask(item);
    }
コード例 #9
0
    public static void GetWWWRequest(this WebRequest wwwUtil, string url, BeginDownLoad begin, DownLoadFinish finish, DownLoadError error = null)
    {
        GetWWWItem item = WWWItemPool.GetWWWItem <GetWWWItem>();

        if (item == null)
        {
            item = new GetWWWItem();
            WWWItemPool.AddWWWItem(item);
        }

        item.SetValue(url);
        item.beginDownload  = begin;
        item.downloadFinish = finish;
        item.downloadError  = error;

        wwwUtil.AddTask(item);
    }