]> Sergey Matveev's repositories - vors.git/blob - internal/var.go
SipHash24 for short messages is much faster and secure enough
[vors.git] / internal / var.go
1 package internal
2
3 import (
4         "net"
5         "time"
6 )
7
8 const (
9         CmdPing = "PING"
10         CmdPong = "PONG"
11         CmdAdd  = "ADD"
12         CmdDel  = "DEL"
13 )
14
15 var (
16         PingTime      = 10 * time.Second
17         ScreenRefresh = 200 * time.Millisecond
18 )
19
20 func IPHdrLen(ip net.IP) uint64 {
21         if ip.To4() == nil {
22                 return 40
23         }
24         return 20
25 }