2024-05-25 08:19:08 +02:00
|
|
|
package communication
|
|
|
|
|
|
|
|
type ClientForServer struct {
|
|
|
|
ID uint16
|
|
|
|
Nickname string
|
|
|
|
}
|
|
|
|
|
|
|
|
type RegisteredUser struct {
|
2024-06-07 20:57:18 +02:00
|
|
|
IsRegistered bool
|
|
|
|
ID uint16
|
2024-05-25 08:19:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const (
|
|
|
|
LINK_STATUS_CREATED = 1 + iota
|
|
|
|
LINK_STATUS_EXPIRED
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
LINK_LEN_V1 = 32
|
|
|
|
)
|
|
|
|
|
|
|
|
// NOTE: Data should be 32 or 64 bytes
|
|
|
|
type Link struct {
|
|
|
|
Status uint8
|
|
|
|
Data []byte
|
2024-06-07 20:57:18 +02:00
|
|
|
UseCount uint16
|
2024-05-25 08:19:08 +02:00
|
|
|
}
|