Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alinradut/NetworkOperationQueue
A naïve multithreaded C++ implementation of a network operation queue using libcurl as backend. Orignally intended to be used with Cocos2D-x
https://github.com/alinradut/NetworkOperationQueue
Last synced: 3 months ago
JSON representation
A naïve multithreaded C++ implementation of a network operation queue using libcurl as backend. Orignally intended to be used with Cocos2D-x
- Host: GitHub
- URL: https://github.com/alinradut/NetworkOperationQueue
- Owner: alinradut
- Created: 2012-01-29T21:33:22.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2014-04-22T09:14:49.000Z (almost 11 years ago)
- Last Synced: 2023-03-11T15:24:24.989Z (almost 2 years ago)
- Language: C++
- Homepage:
- Size: 210 KB
- Stars: 36
- Watchers: 6
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.mdown
Awesome Lists containing this project
- awesome - NetworkOperationQueue - A naïve multithreaded C++ implementation of a network operation queue using libcurl as backend. Orignally intended to be used with Cocos2D-x (etc)
- awesome - NetworkOperationQueue - A naïve multithreaded C++ implementation of a network operation queue using libcurl as backend. Orignally intended to be used with Cocos2D-x (etc)
README
Originally, the code was supposed to be run on Android and iOS in Cocos2D-x, but it is agnostic enough that it can be used on other platforms as well.
This implementation of the threaded network queue has a number of issues that one should pay attention to:
* in order to start/dequeue an operation you need to periodically call the update method on the NetworkOperationQueue
* threads are not reused, but each new operation starts its own thread (no worries, at a given time a max of 10 threads are allowed to be started)
* no support for HTTPS. The libcurl builds that I am using on Android and iPhone do not have OpenSSL support. If you intend to use this code with a SSL enabled CURL make sure you implement the locking functions needed for the SSL provider, otherwise the code will randomly crash on curl_easy_init. Resources:
* thread: http://curl.haxx.se/mail/lib-2009-02/0360.html
* http://curl.haxx.se/libcurl/c/libcurl-tutorial.html#Multi-threading
* example: http://curl.haxx.se/libcurl/c/threaded-ssl.htmlPatches and feedback very much welcome.