This commit is contained in:
gospider
2025-01-03 09:51:55 +08:00
parent 8182106fd4
commit 34a416a1b0
7 changed files with 88 additions and 105 deletions

View File

@@ -81,6 +81,7 @@ type Address struct {
IP net.IP
Port int
NetWork string
Scheme string
}
func (a Address) String() string {
@@ -93,6 +94,9 @@ func (a Address) String() string {
func (a Address) Network() string {
return a.NetWork
}
func (a Address) Nil() bool {
return a.IP == nil && a.Name == ""
}
func ReadUdpAddr(r io.Reader) (Address, error) {
UdpAddress := Address{}