1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Split off cURL

This commit is contained in:
Brian Fiete 2020-07-28 05:57:45 -07:00
parent 65a28a97bb
commit 40bd55fb93
3 changed files with 8 additions and 8 deletions

View file

@ -0,0 +1,6 @@
FileVersion = 1
[Project]
Name = "curl"
TargetType = "BeefLib"
StartupObject = "Program"

View file

@ -1,11 +1,10 @@
using IDE;
using System; using System;
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using System.Diagnostics; using System.Diagnostics;
using System.Collections; using System.Collections;
namespace IDE.Util namespace CURL
{ {
class Transfer class Transfer
{ {
@ -105,9 +104,6 @@ namespace IDE.Util
return 1; return 1;
transfer.Update(dltotal, dlnow); transfer.Update(dltotal, dlnow);
//Debug.WriteLine("{0} of {1}", dlnow, dltotal);
return 0; return 0;
} }
@ -123,7 +119,7 @@ namespace IDE.Util
return count; return count;
} }
public void Setup(String url) public void Init(String url)
{ {
function int(void *p, int dltotal, int dlnow, int ultotal, int ulnow) callback = => Callback; function int(void *p, int dltotal, int dlnow, int ultotal, int ulnow) callback = => Callback;
mCurl.SetOptFunc(.XferInfoFunction, (void*)callback); mCurl.SetOptFunc(.XferInfoFunction, (void*)callback);
@ -140,8 +136,6 @@ namespace IDE.Util
public Result<Span<uint8>> Perform() public Result<Span<uint8>> Perform()
{ {
//mCurl.SetOpt(.Verbose, true);
//mCurl.SetOpt(.X)
mStatsTimer.Start(); mStatsTimer.Start();
var result = mCurl.Perform(); var result = mCurl.Perform();
mStatsTimer.Stop(); mStatsTimer.Stop();