Joins the specified multicast group
Return the address this socket is currently bound at.
Local address
Close the Netlink socket. After this, all other methods can no longer be called.
Leaves the specified multicast group
Generate a unique sequence number to use in a message
Returns the SO_RCVBUF
socket receive buffer size in bytes
Returns the SO_SNDBUF
socket send buffer size in bytes
If true is passed, the socket will be kept referenced (preventing the event loop from exiting) even when there are no pending messages. Otherwise, the socket will be dereferenced when there are no pending messages.
Socket ref state
Sends a message with the REQUEST and ACK flags set, and waits for a reply for the same sequence number.
Note that this method doesn't check the origin of the reply, you should do that yourself.
An array of mesages is returned. This will contain
many items for multipart messages, zero if an ACK
is received (and checkError
isn't disabled) and
one for other messages.
Message type
Message payload
Options
Promise that resolves with [msg, rinfo]
of
the received message. The promise rejects if the message
coudln't be sent or if the timeout expires. If
checkError
isn't disabled, the promise will also
reject if an ERROR message is received.
Send a Netlink message over the socket, addressed as the options indicate. By default, the sequence number and port will be filled automatically.
Message type
Message payload
Message send options
Callback will be called after the message has been sent (or failed to be sent)
The sequence number of the sent message
Sets the SO_RCVBUF
socket option. Sets the maximum socket receive buffer in bytes.
Sets the SO_SNDBUF
socket option. Sets the maximum socket send buffer in bytes.
Equivalent to socket.ref(false)
, see ref
Generated using TypeDoc
TODO
This socket silently discards invalid messages (see
invalid
event). FIXME: cork / uncork api FIXME: debug option, common for all sockets