doc: update doc

This commit is contained in:
nadoo committed 2020-04-14 00:17:46 +08:00
1 parent d8b9e00025
commit 8ccafa8fbd
3 files changed
+31 -23

No files matched your search

+2 -2
View File
@@ -15,7 +15,7 @@ type Dialer interface {
UDPDialer
}
// TCPDialer is used to create connection.
// TCPDialer is used to create tcp connection.
type TCPDialer interface {
// Addr is the dialer's addr
Addr() string
@@ -24,7 +24,7 @@ type TCPDialer interface {
Dial(network, addr string) (c net.Conn, err error)
}
// UDPDialer is used to create connection.
// UDPDialer is used to create udp PacketConn.
type UDPDialer interface {
// Addr is the dialer's addr
Addr() string
+1 -1
View File
@@ -92,7 +92,7 @@ func dial(network, addr string, localIP net.IP) (net.Conn, error) {
// DialUDP connects to the given address
func (d *Direct) DialUDP(network, addr string) (net.PacketConn, net.Addr, error) {
// TODO: support specifying local interface
la := ""
var la string
if d.ip != nil {
la = d.ip.String() + ":0"
}