Create types in separate file in communication package

This commit is contained in:
qowevisa 2024-05-25 09:19:08 +03:00
parent aa63fb8f23
commit fbd3c39aa9

26
communication/types.go Normal file
View File

@ -0,0 +1,26 @@
package communication
type ClientForServer struct {
ID uint16
Nickname string
}
type RegisteredUser struct {
ID uint16
}
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
UseCount uint32
}