#2 p2p mode

Closed
opened 1 year ago by j3tracey · 2 comments

Clients currently require a server to send messages. We want to simulate Ricochet/Cwtch-style messengers, so we need the ability to send p2p messages too. The server is extremely minimal, it mostly just forwards messages, so clients almost could operate without one, but we'll need p2p mode to make two changes:

  • Clients currently start connections to the server with their ID, so that backlog messages can be sent to them. This isn't forwarded to the recipient clients, so p2p mode would need to either remove this, or expect it.
  • Conversations with a central server save bandwidth in group messages by "encrypting with a single shared key" (encryption is a NOP for us, of course), and only sending the message to the server once, which the server then forwards to all recipients. Clients operating in p2p mode don't have this luxury, so will have to be configured to open multiple sockets for each recipient in a group conversation, and send the message over each one.
Clients currently require a server to send messages. We want to simulate Ricochet/Cwtch-style messengers, so we need the ability to send p2p messages too. The server is extremely minimal, it mostly just forwards messages, so clients *almost* could operate without one, but we'll need p2p mode to make two changes: - Clients currently start connections to the server with their ID, so that backlog messages can be sent to them. This isn't forwarded to the recipient clients, so p2p mode would need to either remove this, or expect it. - Conversations with a central server save bandwidth in group messages by "encrypting with a single shared key" (encryption is a NOP for us, of course), and only sending the message to the server once, which the server then forwards to all recipients. Clients operating in p2p mode don't have this luxury, so will have to be configured to open multiple sockets for each recipient in a group conversation, and send the message over each one.
Justin Tracey commented 1 year ago
Owner

Fixed via a77581b348

Fixed via a77581b348
Justin Tracey commented 1 year ago
Owner

I forgot to add the actual peer code in that commit, added it in 1d900f96b3

I forgot to add the actual peer code in that commit, added it in 1d900f96b3
Sign in to join this conversation.
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.