This is more appropriate for logging and its use as a byte blob elsewhere.
}
func (s *server) newConn() (ret udp.ConnectionId) {
- ret = rand.Int63()
+ ret = rand.Uint64()
if s.conns == nil {
s.conns = make(map[udp.ConnectionId]struct{})
}
type TransactionId = int32
-type ConnectionId = int64
+type ConnectionId = uint64
type ConnectionRequest struct {
ConnectionId ConnectionId
if err != nil {
panic(err)
}
- return int64(binary.BigEndian.Uint64(b[:]))
+ return binary.BigEndian.Uint64(b[:])
}
func RunSimple(ctx context.Context, s *Server, pc net.PacketConn, family udp.AddrFamily) error {