Source of: /manual/en/function.stream-socket-get-name.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.stream.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'function.stream-socket-get-name.php',
1 => 'stream_socket_get_name',
),
'up' =>
array (
0 => 'ref.stream.php',
1 => 'Stream Functions',
),
'prev' =>
array (
0 => 'function.stream-socket-enable-crypto.php',
1 => 'stream_socket_enable_crypto',
),
'next' =>
array (
0 => 'function.stream-socket-pair.php',
1 => 'stream_socket_pair',
),
'alternatives' =>
array (
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="function.stream-socket-get-name" class="refentry">
<div class="refnamediv">
<h1 class="refname">stream_socket_get_name</h1>
<p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">stream_socket_get_name</span> — <span class="dc-title">Retrieve the name of the local or remote sockets</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.stream-socket-get-name-description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type">string</span> <span class="methodname"><strong>stream_socket_get_name</strong></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$handle</code></span>
, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$want_peer</code></span>
)</div>
<p class="para rdfs-comment">
Returns the local or remote name of a given socket connection.
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.stream-socket-get-name-parameters">
<h3 class="title">Parameters</h3>
<p class="para">
<dl>
<dt>
<span class="term"><em><code class="parameter">handle</code></em></span>
<dd>
<p class="para">
The socket to get the name of.
</p>
</dd>
</dt>
<dt>
<span class="term"><em><code class="parameter">want_peer</code></em></span>
<dd>
<p class="para">
If set to <strong><code>TRUE</code></strong> the <em>remote</em> socket name will be returned, if set
to <strong><code>FALSE</code></strong> the <em>local</em> socket name will be returned.
</p>
</dd>
</dt>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.stream-socket-get-name-returnvalues">
<h3 class="title">Return Values</h3>
<p class="para">
The name of the socket.
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.stream-socket-get-name-seealso">
<h3 class="title">See Also</h3>
<p class="para">
<ul class="simplelist">
<li class="member"> <span class="function"><a href="function.stream-socket-accept.php" class="function" rel="rdfs-seeAlso">stream_socket_accept()</a> - Accept a connection on a socket created by stream_socket_server</span></li>
</ul>
</p>
</div>
</div><?php manual_footer(); ?>