Options
All
  • Public
  • Public/Protected
  • All
V1.7
  • V1.6
  • V1.7
Menu

Namespace "uv"

LibUV bindings exposed to JavaScript in a mostly 1-1 manner.

See http://docs.libuv.org/en/v1.x/

Index

Type aliases

Address

Address: { family?: string; ip: string; port: number }

Type declaration

  • Optional family?: string
  • ip: string
  • port: number

Flags

Flags: number | "r" | "r+" | "w" | "w+" | "a" | "a+" | "rs" | "rs+" | "sr" | "sr+" | "wx" | "wx+" | "xw" | "xw+" | "ax" | "ax+" | "xa" | "xa+"

flags can be raw numerical constants ORed together or use string aliases.

  • r is UV_FS_O_RDONLY
  • w is UV_FS_O_TRUNC | UV_FS_O_CREAT | UV_FS_O_WRONLY
  • a is UV_FS_O_APPEND | UV_FS_O_CREAT | UV_FS_O_WRONLY
  • Adding + uses UV_FS_O_RDWR instead of UV_FS_O_RDONLY or UV_FS_O_WRONLY.
  • Adding s adds UV_FS_O_SYNC
  • Adding x adds UV_FS_O_EXCL

StatEntry

StatEntry: { gid: number; mode: number; size: number; type: "file" | "dir" | "link" | "fifo" | "socket" | "char" | "block"; uid: number }

Type declaration

  • gid: number
  • mode: number
  • size: number
  • type: "file" | "dir" | "link" | "fifo" | "socket" | "char" | "block"
  • uid: number

Variables

Const JOIN_GROUP

JOIN_GROUP: number

Const LEAVE_GROUP

LEAVE_GROUP: number

Const UDP_IPV6ONLY

UDP_IPV6ONLY: number

Const UDP_PARTIAL

UDP_PARTIAL: number

Const UDP_REUSEADDR

UDP_REUSEADDR: number

Functions

getFreeMemory

  • getFreeMemory(): number
  • Gets free memory information (in bytes).

    Returns number

getTotalMemory

  • getTotalMemory(): number
  • Gets total memory information (in bytes).

    Returns number

getaddrinfo

hrtime

  • hrtime(): number
  • Returns the current high-resolution real time. This is expressed in nanoseconds. It is relative to an arbitrary time in the past. It is not related to the time of day and therefore not subject to clock drift. The primary use is for measuring performance between intervals.

    Returns number

loadavg

  • loadavg(): [number, number, number]
  • Gets the load average

    Returns [number, number, number]

osGetenv

  • osGetenv(name: string): string
  • Retrieves the environment variable specified by name.

    Parameters

    • name: string

    Returns string

printActiveHandles

  • printActiveHandles(): void
  • This is the same as printAllHandles() except only active handles are printed.

    Returns void

printAllHandles

  • printAllHandles(): void

residentSetMemory

  • residentSetMemory(): number
  • Gets the resident set size (RSS) for the current process.

    Returns number

uptime

  • uptime(): number

Generated using TypeDoc