Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! add subject to sentences.
  • Loading branch information
mkrawczuk committed Jun 20, 2020
commit 23ad265fa569726ac168e6c79c2a083ab71d6b1c
31 changes: 15 additions & 16 deletions doc/api/dgram.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ Tells the kernel to join a multicast group at the given `multicastAddress` and
one interface and will add membership to it. To add membership to every
available interface, call `addMembership` multiple times, once per interface.

When called on an unbound socket, implicitly binds to a random port, listening
on all interfaces.
When called on an unbound socket, it will implicitly bind to a random port,
listening on all interfaces.

When sharing a UDP socket across multiple `cluster` workers, the
`socket.addMembership()` function must be called only once or an
Expand Down Expand Up @@ -146,9 +146,8 @@ is not specified, the operating system will choose one interface and will add
membership to it. To add membership to every available interface, call
`socket.addSourceSpecificMembership()` multiple times, once per interface.


When called on an unbound socket, implicitly binds to a random port, listening
on all interfaces.
When called on an unbound socket, it will implicitly bind to a random port,
listening on all interfaces.

### `socket.address()`
<!-- YAML
Expand All @@ -161,7 +160,7 @@ Returns an object containing the address information for a socket.
For UDP sockets, this object will contain `address`, `family` and `port`
properties.

Throws `EBADF` if called on an unbound socket.
It throws `EBADF` if called on an unbound socket.

### `socket.bind([port][, address][, callback])`
<!-- YAML
Expand Down Expand Up @@ -354,7 +353,7 @@ added: v8.7.0

* Returns: {number} the `SO_RCVBUF` socket receive buffer size in bytes.

Throws [`ERR_SOCKET_BUFFER_SIZE`][] if called on an unbound socket.
It throws [`ERR_SOCKET_BUFFER_SIZE`][] if called on an unbound socket.

### `socket.getSendBufferSize()`
<!-- YAML
Expand All @@ -363,7 +362,7 @@ added: v8.7.0

* Returns: {number} the `SO_SNDBUF` socket send buffer size in bytes.

Throws [`ERR_SOCKET_BUFFER_SIZE`][] if called on an unbound socket.
It throws [`ERR_SOCKET_BUFFER_SIZE`][] if called on an unbound socket.

### `socket.ref()`
<!-- YAML
Expand Down Expand Up @@ -466,7 +465,7 @@ Offset and length are optional but both *must* be set if either are used.
They are supported only when the first argument is a `Buffer`, a `TypedArray`,
or a `DataView`.

Throws [`ERR_SOCKET_BAD_PORT`][] if called on an unbound socket.
It throws [`ERR_SOCKET_BAD_PORT`][] if called on an unbound socket.

Example of sending a UDP packet to a port on `localhost`;

Expand Down Expand Up @@ -548,7 +547,7 @@ added: v0.6.9
Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP
packets may be sent to a local interface's broadcast address.

Throws `EBADF` if called on an unbound socket.
It throws `EBADF` if called on an unbound socket.

### `socket.setMulticastInterface(multicastInterface)`
<!-- YAML
Expand Down Expand Up @@ -576,7 +575,7 @@ also use explicit scope in addresses, so only packets sent to a multicast
address without specifying an explicit scope are affected by the most recent
successful use of this call.

Throws `EBADF` if called on an unbound socket.
It throws `EBADF` if called on an unbound socket.

#### Example: IPv6 outgoing multicast interface

Expand Down Expand Up @@ -640,7 +639,7 @@ added: v0.3.8
Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`,
multicast packets will also be received on the local interface.

Throws `EBADF` if called on an unbound socket.
It throws `EBADF` if called on an unbound socket.

### `socket.setMulticastTTL(ttl)`
<!-- YAML
Expand All @@ -657,7 +656,7 @@ decremented to 0 by a router, it will not be forwarded.

The `ttl` argument may be between 0 and 255. The default on most systems is `1`.

Throws `EBADF` if called on an unbound socket.
It throws `EBADF` if called on an unbound socket.

### `socket.setRecvBufferSize(size)`
<!-- YAML
Expand All @@ -669,7 +668,7 @@ added: v8.7.0
Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer
in bytes.

Throws [`ERR_SOCKET_BUFFER_SIZE`][] if called on an unbound socket.
It throws [`ERR_SOCKET_BUFFER_SIZE`][] if called on an unbound socket.

### `socket.setSendBufferSize(size)`
<!-- YAML
Expand All @@ -681,7 +680,7 @@ added: v8.7.0
Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer
in bytes.

Throws [`ERR_SOCKET_BUFFER_SIZE`][] if called on an unbound socket.
It throws [`ERR_SOCKET_BUFFER_SIZE`][] if called on an unbound socket.

### `socket.setTTL(ttl)`
<!-- YAML
Expand All @@ -699,7 +698,7 @@ Changing TTL values is typically done for network probes or when multicasting.
The `ttl` argument may be between between 1 and 255. The default on most systems
is 64.

Throws `EBADF` if called on an unbound socket.
It throws `EBADF` if called on an unbound socket.

### `socket.unref()`
<!-- YAML
Expand Down