You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
658 B
17 lines
658 B
// This file contains global constants of the protocol |
|
package protocol |
|
|
|
// MAXPACKETSIZE. |
|
// How many bytes can contain one packet (header + body) at maximum |
|
// (packets with size bigger than MAXPACKETSIZE are invalid and will not be sent) |
|
const MAXPACKETSIZE uint = 131072 // 128 KiB |
|
|
|
// PACKETSIZEDELIMETER. |
|
// Character that delimits one and the other sides of the next incoming packet. |
|
// ie: |packet_size_here|packet_here, where "|" is PACKETSIZEDELIMETER |
|
const PACKETSIZEDELIMETER string = "|" |
|
|
|
// HEADERDELIMETER. |
|
// Character that delimits header of the packet from the body of the packet. |
|
// ie: FILEINFO~img.png |
|
const HEADERDELIMETER string = "~"
|
|
|