Download this file
| 1 | package protocol |
| 2 | |
| 3 | import "encoding/json" |
| 4 | |
| 5 | // Signal is a client command. The server derives the sender from Peer’s |
| 6 | // session binding, never from an asserted identity in the payload. |
| 7 | type Signal struct { |
| 8 | Peer PeerID `json:"peer"` |
| 9 | Type string `json:"type"` |
| 10 | To PeerID `json:"to,omitempty"` |
| 11 | Seq uint64 `json:"seq,omitempty"` |
| 12 | Gen uint64 `json:"gen,omitempty"` |
| 13 | Payload json.RawMessage `json:"payload,omitempty"` |
| 14 | } |
| 15 | |