uNetworking / uNetworking/uSockets
Optional reference counting
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.5k
- Forks
- 307
- PR merge metrics
- No merged PRs in 30d
Description
Instead of relying strictly on open/close events, a more dynamic resource management can be done with reference counting. Similar to OpenSSL, us_socket_up_ref could be added to ensure a different lifetime for the socket. This together with us_socket_is_closed makes it very useful in cases where you submit the socket to some async queue.
Cost of this could be 1 bit, 1 byte or 2 bytes. More than this, and something is just wrong.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the existing socket lifetime and open/close handling, then locate the public API around us_socket_up_ref and us_socket_is_closed. Define the reference-counting design and its storage cost before implementing it, and verify that sockets submitted to an async queue can remain valid until their references are released.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100