1. Home
  2. Docs
  3. golang
  4. 内置库(包-package)
  5. net

net

Types

type Conn.Dial

func Dial(network, address string) (Conn, error)


Dial connects to the address on the named network.

拨号连接到指定网络上的地址。

Known networks are "tcp", "tcp4" (IPv4-only), "tcp6" (IPv6-only), "udp", "udp4" (IPv4-only), "udp6" (IPv6-only), "ip", "ip4" (IPv4-only), "ip6" (IPv6-only), "unix", "unixgram" and "unixpacket".

type TCPListener func (*TCPListener) Accept

func (l *TCPListener) Accept() (Conn, error)


Accept implements the Accept method in the Listener interface; it waits for the next call and returns a generic Conn.

Accept实现了Listener接口中的Accept方法;它等待下一次调用并返回一个通用的Conn。

Was this article helpful to you? Yes No

How can we help?