|
PHP5中文手册
socket_bind(PHP 4 >= 4.0.7, PHP 5) socket_bind — Binds a name to a socket 说明
bool socket_bind
( resource $socket
, string $address
[, int $port
] )
Binds the name given in address to the socket described by socket . This has to be done before a connection is be established using socket_connect() or socket_listen(). 参数
返回值如果成功则返回 TRUE,失败则返回 FALSE。 The error code can be retrieved with socket_last_error(). This code may be passed to socket_strerror() to get a textual explanation of the error. 范例
Example#1 Using socket_bind() to set the source address
<?php 注释
|