]> Sergey Matveev's repositories - vors.git/blob - internal/var.go
97f6d19e7963811e734035f3cef751c96c7843ebeddaeb6ec33de37ce3e71a87
[vors.git] / internal / var.go
1 package internal
2
3 import (
4         "net"
5         "time"
6 )
7
8 const (
9         CmdErr     = "ERR"
10         CmdCookie  = "COOKIE"
11         CmdSID     = "SID"
12         CmdPing    = "PING"
13         CmdPong    = "PONG"
14         CmdAdd     = "ADD"
15         CmdDel     = "DEL"
16         CmdMuted   = "MUTED"
17         CmdUnmuted = "UNMUTED"
18 )
19
20 var (
21         PingTime      = 10 * time.Second
22         ScreenRefresh = 200 * time.Millisecond
23 )
24
25 func IPHdrLen(ip net.IP) uint64 {
26         if ip.To4() == nil {
27                 return 40
28         }
29         return 20
30 }