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

(elixir) use cbor on tcp transport serialization, introduce support for padding on secure channel #8226

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

polvorin
Copy link
Member

  • port tcp transport layer protocol changes to elixir.
  • port secure channel changes

@polvorin polvorin force-pushed the polvorin/transport_msg branch from 3704e8d to 322a00b Compare June 27, 2024 21:49
@polvorin polvorin changed the title Polvorin/transport msg (elixir) use cbor on tcp transport serialization, introduce support for padding on secure channel Jun 27, 2024
@polvorin polvorin marked this pull request as ready for review June 27, 2024 21:54
@polvorin polvorin requested a review from a team as a code owner June 27, 2024 21:54
@SanjoDeundiak SanjoDeundiak force-pushed the sanjo/transport_msg branch 3 times, most recently from 5df9754 to 769292e Compare June 28, 2024 13:52
adapt tcp transport message serialization and introduce support for padding
in secure channel messages
@polvorin polvorin force-pushed the polvorin/transport_msg branch from 322a00b to 7422441 Compare June 28, 2024 14:09
@@ -28,11 +28,16 @@ defmodule Ockam.Transport.TCP.Handler do

{:ok, socket} = :ranch.handshake(ref, ranch_options)

# Header, protocol version "1" must be the first thing exchanged.
# It isn't send anymore after the initial exchange.
{:ok, <<1>>} = transport.recv(socket, 1, 5000)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wound change the order of these two lines. Imagine the other side doing the same and now both parties are waiting for the version number.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I assumed the connecting side send it, and receiver responded. But will update

do not wait for connecting side header
@polvorin polvorin merged commit d522636 into sanjo/transport_msg Jun 28, 2024
21 checks passed
@polvorin polvorin deleted the polvorin/transport_msg branch June 28, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants