Repository navigation
Merged
Conversation
…OPT_COPYPOSTFIELDS
* refactor(user-agent): fix premature locking * docs(user-agent): document leftover fields and a couple functionalities * refactor(user-agent): make ua_conn a public opaque datatype, add a field for holding onto user callback and context
…de, queue functions
* feat(websockets.c): replace pthread_mutex with pthread_rwlock where it makes sense * refactor(websockets.c): simplify ws_perform() to return a bool on whether the connection is alive * refactor(websockets): add struct ws_attr for passing optional fields. * feat(websockets): add ws_timestamp_update() for manually updating internally used timestamp * refactor(websockets.c): remove noop functions and simply check for NULL
…tributes, to improve flexibility when adding new config
…orca_global_cleanup()
…ord_global_cleanup()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR accomplishes a bunch, most of which are internal refactoring which won't be listed here. Here are the main feature changes:
Discord
Client
const struct discord_user *botfrom callback parameters, which only forced an additional parameter that wasn't used very often. Addeddiscord_get_self()as a replacement.Adapter
curl_multiinterface. All the code pertaining to the async logic can be found here. Seetest-discord-async.cfor a usage example.Ratelimiting
per-idand notper-endpoint.x-ratelimit-reset-afterheader is prioritized overx-ratelimit-resetas its more reliableOrca
General
work.cto introduce a global threadpool that can be shared between different APIsorca_global_init()andorca_global_cleanup()tocommon.c, as those include resources common to all APIsWebSockets
curl_multihandle, of which they can configure themselves.User-Agent