18 lines
247 B
Go
18 lines
247 B
Go
package core
|
|
|
|
import (
|
|
"net"
|
|
"time"
|
|
)
|
|
|
|
// Client represents a UDP client.
|
|
type Client struct {
|
|
address *net.UDPAddr
|
|
lastPacket time.Time
|
|
}
|
|
|
|
// String shows the client address.
|
|
func (c *Client) String() string {
|
|
return c.address.String()
|
|
}
|