mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 22:34:02 +03:00
FILE / ScuroNeko/mtg
stats/stream_info.go
Исходный файл и его история в репозитории.
20 lines
229 B
Go
20 lines
229 B
Go
package stats
|
|
|
|
import (
|
|
"net"
|
|
"time"
|
|
)
|
|
|
|
type streamInfo struct {
|
|
createdAt time.Time
|
|
clientIP net.IP
|
|
}
|
|
|
|
func (s *streamInfo) IPType() string {
|
|
if s.clientIP.To4() == nil {
|
|
return TagIPTypeIPv6
|
|
}
|
|
|
|
return TagIPTypeIPv4
|
|
}
|