该类表示没有协议附加的套接字地址。
This class represents a Socket Address with no protocol attachment.
根据主机名和端口号创建一个套接字地址。
方法bind将一个套接字地址作为其参数。
根据IP地址和端口号创建一个套接字地址。
Creates a socket address from an IP address and a port number.
创建一个绑定在指定套接字地址的多播套接字。
Create a MulticastSocket bound to the specified socket address.
创建一个套接字地址,其IP地址为掩码地址,端口号为指定值。
Creates a socket address where the IP address is the wildcard address and the port number a specified value.
根据调用之后该结构中填充的套接字地址的长度,可以对这个指针进行移动。
The pointer should be moved adequately depending on the length of socket address as populated in the structure after the call.
清单3.使用SO_REUSEADDR套接字选项避免地址使用错误。
Listing 3. Avoiding the "Address in USE" error using the SO_REUSEADDR socket option.
在AIX 上,进程是关于OS 控制资源(比如文件和套接字信息)、虚拟地址空间以及至少一个执行线程的一系列信息。
On AIX a process is a collection of information about OS-controlled resources (such as file and socket information), a virtual address space, and at least one thread of execution.
在TIME_WAIT状态退出之后,套接字被删除,该地址才能被重新绑定而不出问题。
After the TIME_WAIT state has exited, the socket is removed, and the address can be rebound without issue.
套接字的地址由主机的IP地址(或主机名)和端口号组成。
The address of a socket is a combination of the host's IP address (or hostname) plus a port number.
对于显式绑定,在绑定的IP地址上执行检查,并相应设置套接字选项。
In the case of explicit binding, checks are performed on the IP address being bound, and the socket options are set accordingly.
运行netstat -Aan,其中的-a显示与套接字相关联的任何协议控制块的地址。
Run netstat -aan, where -a shows the address of any protocol control blocks associated with the sockets.
在这里,我将服务器套接字绑定到localhost: 20340这一地址。
Here, I've bound the server socket at the localhost: 20340 address.
bind系统调用将本地网络传输地址与套接字关联。
The bind system call associates a local network transport address with a socket.
您需要创建一个服务器套接字,接收预先指定地址的连接。
You need to create a server socket that can accept connections at a predefined address.
运行kdb并对感兴趣的套接字的地址执行sockinfo。
Run KDB and issue sockinfo on the address for the socket in question.
找到空闲端口的便利方法是传递一个null地址,它会自动将套接字绑定到本地主机地址,并使用空闲的临时端口。
A convenient way to find a free port is to pass in a null address, which automatically binds the socket to the local host address and USES a free ephemeral port.
您可以使用bindapi函数来绑定一个地址(一个接口和一个端口)到一个套接字端点。
You can use the bind API function to bind an address (an interface and a port) to a socket endpoint.
将套接字绑定到指定的端口和地址。
Binds this socket to the specified port number on the specified host.
返回此服务器套接字的本地地址。
设置或者清除套接字的SO_BROADCAST(广播)选项。当该设置生效时,UDP数据包将被发送至本地网络接口的广播地址。
Sets or clears the SO_BROADCAST socket option. When this option is set, UDP packets may be sent to a local interface's broadcast address.
获得多播套接字使用的网络接口地址。
Retrieve the address of the network interface used for multicast packets.
获得多播套接字使用的网络接口地址。
Retrieve the address of the network interface used for multicast packets.
应用推荐