swiftlang / swiftlang/swift-corelibs-libdispatch
[SR-5144] Can't easily drive writev(2) from a DispatchData
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.6k
- Forks
- 496
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
| Previous ID | SR-5144 |
| Radar | rdar://problem/32611730 |
| Original Reporter | @weissi |
| Type | Bug |
Additional Detail from JIRA
| Votes | 0 |
| Component/s | libdispatch |
| Labels | Bug |
| Assignee | None |
| Priority | Medium |
md5: 310f75fc86b29f0f1a44e9f288bbe223
Issue Description:
In network programming it's often necessary to call writev(2) given a DispatchData . In fact, DispatchData seems a perfect data type to do that. Unfortunately, in Swift it's currently impossible to do so (in a guaranteed safe way).
Sure, there's DispatchIO.write but there's cases where we need to call writev directly so it should be supported.
Contributor guide
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 reviewing DispatchData and the existing DispatchIO.write API, then compare them with the writev(2) entry point mentioned in the issue. The work is complete when Swift code can safely pass a DispatchData to writev(2) without relying on unsafe handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, swift
- Domain
- api, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100