You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
340 B
Go
18 lines
340 B
Go
3 years ago
|
package tcp
|
||
|
|
||
|
// NameAddress wraps a string and implements the
|
||
|
// net.Listener interface.
|
||
|
type NameAddress struct {
|
||
|
Address string
|
||
|
}
|
||
|
|
||
|
// Network returns the network type. Always returns "tcp".
|
||
|
func (n NameAddress) Network() string {
|
||
|
return "tcp"
|
||
|
}
|
||
|
|
||
|
// String returns the address.
|
||
|
func (n NameAddress) String() string {
|
||
|
return n.Address
|
||
|
}
|