joyent/node — pull request #5686 by RommelVR (2013-06-14 01:56:51+00:00)
Title: Updates dgram.markdown with optional port for socket.bind()

As explained several times throughout this document already.

```
Call `socket.bind` if you want to receive datagrams. `socket.bind()` will bind
to the "all interfaces" address on a random port (it does the right thing for
both `udp4` and `udp6` sockets). You can then retrieve the address and port
with `socket.address().address` and `socket.address().port`.
```

and

```
If the socket has not been previously bound with a call to `bind`, it's
assigned a random port number and bound to the "all interfaces" address
(0.0.0.0 for `udp4` sockets, ::0 for `udp6` sockets).
```

I felt for an API lookup, it is a good idea to repeat this in `socket.bind` itself.