Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-12982] Foundation: Stream.getBoundStreams not available #3251

Open
weissi opened this issue Jun 11, 2020 · 2 comments
Open

[SR-12982] Foundation: Stream.getBoundStreams not available #3251

weissi opened this issue Jun 11, 2020 · 2 comments

Comments

@weissi
Copy link
Member

weissi commented Jun 11, 2020

Previous ID SR-12982
Radar rdar://problem/64947425
Original Reporter @weissi
Type Bug
Environment
docker.io/swiftlang/swift:nightly-master-bionic
Swift version 5.3-dev (LLVM 6049ecf8a0, Swift 4205e46959)
Target: x86_64-unknown-linux-gnu
Additional Detail from JIRA
Votes 1
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: 7b395a96600be27ba3bccd448b599c4c

Issue Description:

I'm really not an expert in URLSession but I wanted to implement bidirectional streaming with it and I believe I require Stream.getBoundStreams for that (https://developer.apple.com/documentation/foundation/url_loading_system/uploading_streams_of_data).

But:

$ jw-docker-swift-master swift run
docker.io/swiftlang/swift:nightly-master-bionic
/Users/johannes/devel/URLSessionBidiStreaming/Sources/URLSessionBidiStreaming/main.swift:59:16: error: type 'Stream' has no member 'getBoundStreams'
        Stream.getBoundStreams(withBufferSize: 4096,
        ~~~~~~ ^~~~~~~~~~~~~~~

it seems like Streams.getBoundStreams isn't available on Linux.

@weissi
Copy link
Member Author

weissi commented Jun 19, 2020

@swift-ci create

@mickeyl
Copy link

mickeyl commented Apr 30, 2021

Indeed, I spotted this just recently as well. It's kind of a showstopper for one of my projects which is based on a generic stream abstraction (bridging to different transport means like CoreBluetooth, ExternalAccessory, TTY, TCP, etc.).

I first thought it was just the convenience method for gathering the stream pair missing on Linux, but as a matter of fact, the whole `CFSocketStream` infrastructure is absent. I need to have a TCP stream socket pair on Linux – do you know of any existing projects (other than Swift-NIO, which is great in its own right, but too much of a hammer for this very nail) or shall we cooperate on a small socket stream implementation for Posix sockets?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants