-
Notifications
You must be signed in to change notification settings - Fork 58
feat: Add TCP socket support #306
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
feat: Add TCP socket support #306
Conversation
0724171 to
eb1b21c
Compare
Add TCP support for non-windows platforms: - Add helpers to parse TCP addresses - Add TCP transport and helpers for the async implementation Signed-off-by: Kostis Papazafeiropoulos <[email protected]>
eb1b21c to
b4331ab
Compare
|
Hi @papazof, Thank you for you pull request and how about adding a new example which name is like With these two files, we can not only know how to use the TCP feature, but also quickly add it to the CI ttrpc-rust/tests/run-examples.rs Line 88 in 2244900
Thanks again! |
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.
Cool!
Sure, i was debating on how to add examples on this. The workflow is the same as the existing examples (apart from the sock removal), so all previous examples should work (on unix) by simply changing the socket. Do you think extending the existing examples - ie. with a cli arg - would make sense for you or do you have another solution in mind? |
Good, let's do it. |
Extend examples to use a TCP socket if the `--tcp` flag is provided and add the TCP versions to `run-examples` Signed-off-by: Kostis Papazafeiropoulos <[email protected]>
|
I had a go at extending the examples. Let me know if you want something handled differently. |
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.
LGTM, thanks @papazof
Add primitives for TCP support:
Note:
This PR does not include Windows support for TCP since we don't use or have experience with it, but since the TCP support is based on
std::netcomponents the rust primitives should be cross-platform@lifupan