4.2.3 • Published 6 months ago

@types/nanomsg v4.2.3

Weekly downloads
79
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/nanomsg

Summary

This package contains type definitions for nanomsg (https://github.com/nickdesaulniers/node-nanomsg).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nanomsg.

index.d.ts

// Type definitions for nanomsg 3.2
// Project: https://github.com/nickdesaulniers/node-nanomsg
// Definitions by: Titan <https://github.com/titan>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />

export interface Options {
  raw?: boolean | undefined;
  tcpnodelay?: boolean | undefined;
  linger?: number | undefined;
  sndbuf?: number | undefined;
  rcvbuf?: number | undefined;
  sndtimeo?: number | undefined;
  rcvtimeo?: number | undefined;
  reconn?: number | undefined;
  maxreconn?: number | undefined;
  sndprio?: number | undefined;
  rcvprio?: number | undefined;
  ipv6?: boolean | undefined;
  rcvmaxsize?: number | undefined;
  chan?: string[] | undefined;
  wsopt?: "text" | "binary" | undefined;
}

export class Socket {
  constructor(type: string, opts: Options);
  shutdown(addr: string): void;
  bind(addr: string): void;
  connect(addr: string): void;
  close(): void;
  send(buf: Buffer | string): number;
  on(event: string, cb: (data: Buffer) => void): void;
}

export function socket(type: string, opts?: Options): Socket;

Additional Details

  • Last updated: Thu, 08 Jul 2021 18:51:09 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Titan.

4.2.3

6 months ago

4.2.2

7 months ago

4.2.1

8 months ago

4.2.0

2 years ago

3.2.3

3 years ago

3.2.2

7 years ago

3.2.1

7 years ago

3.2.0

7 years ago