swiftlang / swiftlang/swift-corelibs-libdispatch

[SR-5144] Can't easily drive writev(2) from a DispatchData

Open
#688 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug libdispatch
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.