-
Notifications
You must be signed in to change notification settings - Fork 133
Bidirectional stream events #583
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
Conversation
Examples/bidirectional-event-streams-client-example/Package.swift
Outdated
Show resolved
Hide resolved
Examples/bidirectional-event-streams-server-example/Package.swift
Outdated
Show resolved
Hide resolved
...server-example/Sources/BidirectionalEventStreamsServer/BidirectionalEventStreamsServer.swift
Outdated
Show resolved
Hide resolved
Co-authored-by: Honza Dvorsky <[email protected]>
Co-authored-by: Honza Dvorsky <[email protected]>
@swift-server-bot test this please |
@akbashev Please run |
Ah, while trying to figure out about streams and URLSession, completely forgot about swift-format. Just run and pushed fixes. |
@swift-server-bot test this please |
@swift-server-bot test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Motivation
While working with my swift distributed actors showcase one of the points for me was to try openapi. As this is a chat client showcase, took me some time to realise that you can do bidirectional streaming. Think this is quite an important feature and not very discoverable, so to fill this gap—created two simple examples. Things to consider:
event-streams-_-example
heartbeat
messages to keep/close connections, but think this should be done by whoever implements the clients.Modifications
Working examples showing bidirectional streaming both for server and client.
Test Plan
I've tested myself, it's working, don't think examples are covered with tests.