This commit is contained in:
jdl
2025-01-02 07:42:00 +01:00
parent 5d97cccb98
commit f0076939d5
12 changed files with 131 additions and 197 deletions

View File

@@ -1,18 +1,17 @@
// The package `m` contains models shared between the hub and peer programs.
package m
type PeerInitArgs struct {
EncPubKey []byte
PubSignKey []byte
}
type PeerConfig struct {
PeerIP byte
HubAddress string
Network []byte
APIKey string
PublicIP []byte
Port uint16
Relay bool
PubKey []byte
PrivKey []byte
PubSignKey []byte
PrivSignKey []byte
PeerIP byte
Network []byte
PublicIP []byte
Port uint16
Relay bool
}
type Peer struct {
@@ -27,14 +26,5 @@ type Peer struct {
}
type NetworkState struct {
HubAddress string
// The requester's data:
Network []byte
PeerIP byte
PublicIP []byte
Port uint16
// All peer data.
Peers [256]*Peer
}