public function bind($address, $port = 0)
    {
        return static::exceptionOnFalse(
            $this->resource,
            function ($resource) use ($address, $port) {
                return @socket_bind($resource, $address, $port);
            }
        );
    }
public function bind($address, $port = 0)
    {
        return static::exceptionOnFalse(
            $this->resource,
            function ($resource) use ($address, $port) {
                return @socket_bind($resource, $address, $port);
            }
        );
    }
public function bind ( $ address , $ port = 0 ) { return static :: exceptionOnFalse ( $ this -> resource , function ( $ resource ) use ( $ address , $ port ) { return @ socket_bind ( $ resource , $ address , $ port ) ; } ) ; }
Binds a name to a socket.

<p>Binds the name given in address to the php socket resource currently in use. This has to be done before a
connection is established using <code>connect()</code> or <code>listen()</code>.</p>

@param string $address <p>If the socket is of the AF_INET family, the address is an IP in dotted-quad
notation (e.g. <code>127.0.0.1</code>).</p> <p>If the socket is of the AF_UNIX family, the address is the path
of the Unix-domain socket (e.g. <code>/tmp/my.sock</code>).</p>
@param int    $port    <p>(Optional) The port parameter is only used when binding an AF_INET socket, and designates the port
on which to listen for connections.</p>

@throws Exception\SocketException If the bind was unsuccessful.

@return bool <p>Returns <code>true</code> if the bind was successful.</p>
Binds a name to a socket .