This commit is contained in:
jdl
2024-12-13 21:30:06 +01:00
parent d9233af4c9
commit 6fcd8637a3
16 changed files with 191 additions and 364 deletions

View File

@@ -1,22 +1,14 @@
package peer
const (
MAX_IP = 65
DEFAULT_PORT = 515
NONCE_SIZE = 24
KEY_SIZE = 32
SIG_SIZE = 64
MTU = 1376
BUFFER_SIZE = 2048 // Definitely big enough.
MTU = 1436
BUFFER_SIZE = 1536 // Definitely big enough.
STREAM_DATA = 0
STREAM_ROUTING = 1 // Routing queries and responses.
// Basic packet types
PACKET_TYPE_DATA = 0
PACKET_TYPE_PING = 1
PACKET_TYPE_PONG = 2
// Packet sizes.
PING_SIZE = 8
PONG_SIZE = 16
)