-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.d.ts
39 lines (30 loc) · 930 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Type definitions for net-keepalive
// Project: https://github.com/hertzg/node-net-keepalive
// Definitions by: George Kotchlamazashvili
// Definitions: https://github.com/hertzg/node-net-keepalive
/// <reference types="node" />
import { Socket } from 'net'
export type NodeJSSocketWithFileDescriptor =
| Socket
| { _handle: { _fd: number } }
export function setKeepAliveInterval(
socket: NodeJSSocketWithFileDescriptor,
intvl: number
): boolean
export function getKeepAliveInterval(
socket: NodeJSSocketWithFileDescriptor
): number
export function setKeepAliveProbes(
socket: NodeJSSocketWithFileDescriptor,
cnt: number
): boolean
export function getKeepAliveProbes(
socket: NodeJSSocketWithFileDescriptor
): number
export function setUserTimeout(
socket: NodeJSSocketWithFileDescriptor,
timeout: number
): boolean
export function getUserTimeout(
socket: NodeJSSocketWithFileDescriptor
): number