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 <papazof@gmail.com>
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! |
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 <papazof@gmail.com>
|
I had a go at extending the examples. Let me know if you want something handled differently. |
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