mirror of
https://github.com/tinygo-org/net.git
synced 2026-08-20 12:28:59 +00:00
refurbish internal netdever interface to use netip types instead of net.IP
This commit is contained in:
+3
-2
@@ -11,6 +11,7 @@ package net
|
||||
import (
|
||||
"internal/itoa"
|
||||
"io"
|
||||
"net/netip"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
@@ -61,8 +62,8 @@ func DialTLS(addr string) (*TLSConn, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err = netdev.Connect(fd, host, IP{}, port); err != nil {
|
||||
addrport := netip.AddrPortFrom(netip.Addr{}, uint16(port))
|
||||
if err = netdev.Connect(fd, host, addrport); err != nil {
|
||||
netdev.Close(fd)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user