Giter Site home page Giter Site logo

91act / curl-unity Goto Github PK

View Code? Open in Web Editor NEW
98.0 98.0 20.0 138.76 MB

This is a C# wrapper for Unity to use libcurl with http/2 and openssl enabled.

CMake 0.36% Shell 1.56% Batchfile 0.10% C++ 5.73% C 66.70% Makefile 5.55% M4 1.20% Perl 10.25% Roff 5.29% DIGITAL Command Language 0.38% Python 1.83% Dockerfile 0.01% Go 0.21% Ruby 0.01% Objective-C 0.31% Assembly 0.31% eC 0.01% Module Management System 0.01% Emacs Lisp 0.01% C# 0.19%

curl-unity's People

Contributors

jayatubi avatar y0n3t4n1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

curl-unity's Issues

xcode build报错

'/Users/username/Documents/projectdir/iOS/ProjectName/Libraries/curl-unity/Plugins/ios/libcurl.a(libcurl_la-easy.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64

Xcode build失败 提示以上报错 ,好像可以通过关闭BitCode解决,后面这个第三方库会支持BitCode吗

Send continuous stream to endpoint

First, thank you for being so responsive.

Somewhat related to a previous issue I submitted, I'm now trying to send a continuous audio stream--recorded from the microphone--to the Alexa Voice Service in 10ms chunks.

However, there doesn't seem to be a way to send a stream of bytes (or floats) of indeterminate size. The Curl Interface seems to have a form_add, READData, and ReadFunction options that seem relevant, but they're not implemented. I may be looking in the wrong place, though.

Any idea how I might add a binary audio stream to a multipart message and keep adding to it until a separate function tells me to stop (I'm receiving directives on a separate channel and can end the audio stream if there's a method to close the stream)?

Reference:
https://developer.amazon.com/docs/alexa-voice-service/speechrecognizer.html#recognize

运行失败

EntryPointNotFoundException: curl_multi_init
CurlUnity.CurlMulti..ctor (System.IntPtr ptr) (at Assets/curl-unity/Scripts/CurlMulti.cs:38)
CurlTest.Start () (at Assets/curl-unity/CurlTest.cs:10)
您好 ,我在导入assets后直接运行,发现这个错误 ,检查了那个dll是存在的,是不是还有其他安装工作需要做 ?

armeabi-v7a Android device CURLOPT_HEADERFUNCTION failed.

Hello.
On the Android device of armeabi-v7a, thiz 'is null in HeaderFunction and sizeandnmemb` become negative values. Is there a workaround?

        [AOT.MonoPInvokeCallback(typeof(Delegates.HeaderFunction))]
        private static long HeaderFunction(IntPtr ptr, long size, long nmemb, IntPtr userdata)
        {
            size = size * nmemb;
            var thiz = ((GCHandle)userdata).Target as CurlEasy;
            ....

CurlMulti可能会有多线程导致崩溃的问题?

使用多线程的CurlMultiUpdater下载过程中调用CurlMulti的Abort有几率会崩溃,堆栈如下:
0x00007FFF0B714699 (curl) curl_mvsprintf
0x00007FFF0B71B812 (curl) curl_multi_wait
0x00007FFF0B71A1D6 (curl) curl_multi_perform
0x00000000BF64A6B6 (curl) CurlUnity.Lib.curl_multi_perform()
0x00000000BF649DBB (curl) CurlUnity.CurlMulti.Perform()
0x0000000002768CC3 (curl) CurlUnity.CurlMultiUpdater.Perform()

怀疑是主线程逻辑调用的CurlMulti的RemoveEasy和分线程下载时调用的Perform有多线程问题,华谊是不是curl_multi_remove_handle和curl_multi_perform在两个线程跑没加锁会有问题?

我把CurlMulti的AddEasy、RemoveEasy、CleanUp和Perform加了代码段锁保护后好像没有重现了,大佬帮忙看下?谢谢啦

Never recieving messages to stream (half-open connection).

I'm using Curl Unity to connect to the HTTP/2 Alexa Voice Service directives endpoint. I've added the CurlMultiUpdater to a game object and I'm using the CurlMulti to create a downchannel connection like below (see AVS link for implementation details).

Unfortunately, no matter what I do, the OnPerformCallback (which creates a log entry and prints the inText output) is never called despite knowing that directives should be being sent to the application. It leads me to believe something must be wrong with the stream or connection that's created, or am I just missing something in the connection creation?

--- Part of function that creates Curl Connection ---
// Create Curl Easy Object
CurlEasy easy = new CurlEasy
{
    method = request.Method,
    debug = true,
    uri = new Uri(request.Url),
    contentType = request.ContentType,
    timeout = request.Timeout,
    lowSpeedTimeout = request.LowSpeedLimit,
    lowSpeedLimit = request.LowSpeedLimit,
    maxRetryCount = 0,
    outData = request.OutData,
    performCallback = OnPerformCallback
};

// Add Access Token
easy.SetHeader("Authorization", "Bearer " + authenticator.GetAccessToken());

if (request.AdditionalHeaders != null)
{
    foreach (KeyValuePair<string, string> entry in request.AdditionalHeaders)
    {
        easy.SetHeader(entry.Key, entry.Value);
    }
}

// Perform CurlMulti Action
Debug.Log("Connecting to " + request.Url);
easy.MultiPerform(curlMulti.DefaultMulti);

----

---- Downchannel callback ----
Debug.Log("In downchannel callback.");
// We're in downchannel callback, meaning we've either received a directive or a disconnect
if (result == CURLE.OK)
{
    // A directive?
	Debug.Log(easy.inText);
}
else
{
    // Server disconnect. Make new downchannel
}
easy.Abort();

关于使用CurlMulti多线程下载的问题

请问一下,我仿照例子,创建了3个CurlEasy,调用MultiPerform加入一个创建的CurlMulti,但是总是在第一个CurlEasy的GET执行完之后,后面的GET才会被发送,这个可能是什么原因?三个CurlEasy的HEAD都正确同时执行过了。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.