- Socket type: PUB / SUB
- Usage:
- Subscribes to messages on localhost:5555 or any other port
- A message format is:
<ServerPubkey> <EncryptedPayload>
where<ServerPubKey>
is a 40 byte Z85 encoded 32-byte pubkey<EncryptedPayload>
format is<Worker> <Command> <Payload>
once decrypted by<SharedKey>
with AES 256SharedKey
is the 32 byte Diffie Hellman derivated key betweenClientPrivKey
andServerPubKey
.Worker
: Either account number id or the * charCommand
: See belowPayload
: Json for the command
- Socket type: PUSH / PULL
- Usage:
- Pushes messages on localhost:5557 or any other port
- A message format is:
<ClientPubKey> <EncryptedPayload>
whereEncryptedPayload
' format is<Worker> <Result> <Payload>
once decrypted by<SharedKey>
with AES 256SharedKey
is the 32 byte Diffie Hellman derivated key betweenServerPrivKey
andClientPubKey
.Worker
: Either account number id or the * charResult
: "OK" or "Error"Payload
: Either a word or json (See each command)
graph LR
A[Server] -- Pub/Sub --> B(Client)
graph LR
A[Client] -- Push/Pull --> B(Client)
sequenceDiagram
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
Bob-->Alice: Checking with John...
Alice->John: Yes... John, how are you?