array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'eventlistener.getsocketname.php', 1 => 'EventListener::getSocketName', 2 => 'Retreives the current address to which the listener\'s socket is bound', ), 'up' => array ( 0 => 'class.eventlistener.php', 1 => 'EventListener', ), 'prev' => array ( 0 => 'eventlistener.getbase.php', 1 => 'EventListener::getBase', ), 'next' => array ( 0 => 'eventlistener.setcallback.php', 1 => 'EventListener::setCallback', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/event/eventlistener/getsocketname.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

EventListener::getSocketName

(PECL event >= 1.5.0)

EventListener::getSocketNameRetreives the current address to which the listener's socket is bound

说明

public static EventListener::getSocketName( string &$address , mixed &$port = ?): bool

Retreives the current address to which the listener's socket is bound.

参数

address

Output parameter. IP-address depending on the socket address family.

port

Output parameter. The port the socket is bound to.

返回值

成功时返回 true, 或者在失败时返回 false