Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RawNetlinkSocket

TODO

Missing things:

  • Credentials passing

events: message truncatedMessage error close

Hierarchy

  • EventEmitter
    • RawNetlinkSocket

Index

Constructors

  • Create a native Netlink socket, bound to the specified protocol at the specified local address (port).

    If no port is passed, generateLocalPort will be used and bind will be retried until we find a free address.

    Parameters

    Returns RawNetlinkSocket

Methods

  • addMembership(group: number): void
  • Joins the specified multicast group

    Parameters

    • group: number

    Returns void

  • address(): { groups: number; port: number }
  • Return the address this socket is currently bound at.

    Returns { groups: number; port: number }

    Local address

    • groups: number
    • port: number
  • close(): void
  • Close the Netlink socket. After this, all other methods can no longer be called.

    Returns void

  • dropMembership(group: number): void
  • Leaves the specified multicast group

    Parameters

    • group: number

    Returns void

  • getRecvBufferSize(): number
  • Returns the SO_RCVBUF socket receive buffer size in bytes

    Returns number

  • getSendBufferSize(): number
  • Returns the SO_SNDBUF socket send buffer size in bytes

    Returns number

  • ref(): void
  • References this socket, preventing the event loop from exiting while it is active. The socket is automatically referenced when it is created.

    Returns void

  • send(msg: Uint8Array | Uint8Array[], options?: RawNetlinkSendOptions, callback?: (error?: Error) => any): void
  • Parameters

    • msg: Uint8Array | Uint8Array[]
    • Optional options: RawNetlinkSendOptions
    • Optional callback: (error?: Error) => any
        • (error?: Error): any
        • Parameters

          • Optional error: Error

          Returns any

    Returns void

  • setRecvBufferSize(size: number): any
  • Sets the SO_RCVBUF socket option. Sets the maximum socket receive buffer in bytes.

    Parameters

    • size: number

    Returns any

  • setSendBufferSize(size: number): any
  • Sets the SO_SNDBUF socket option. Sets the maximum socket send buffer in bytes.

    Parameters

    • size: number

    Returns any

  • unref(): void
  • Unreferences this socket. The socket is automatically referenced when it is created.

    Returns void

Generated using TypeDoc