import { createFromID } from './Header' ; import { serialize } from 'binarytf' ; import { RawMessage } from '../Structures/Base/SocketHandler' ; since export interface SendOptions { receptive ? : boolean ; timeout ? : number ; } since export interface BroadcastOptions extends SendOptions { filter ? : RegExp ; } since export interface NetworkError extends Error { /**
     * If present, the address to which a network connection failed
     */ address ? : string ; /**
     * The string error code
     */ code : string ; /**
     * If present, the file path destination when reporting a file system error
     */ dest ? : string ; /**
     * The system - provided error number
     */ errno : number | string ; /**
     * If present, extra details about the error condition
     */ info ? : Record < string , unknown > ; /**
     * A system - provided human - readable description of the error
     */ message : string ; /**
     * If present, the file path when reporting a file system error
     */ path ? : string ; /**
     * If present, the network connection port that is not available
     */ port ? : number ; /**
     * The name of the system call that triggered the error
     */ syscall : string ; } since internal private export const VCLOSE_SIGNAL = 'VCLOSE' ; since internal private export const VCLOSE = createFromID ( 0 , false , serialize ( VCLOSE_SIGNAL ) ) ; since param processed internal private export function receivedVClose ( processed ) { return processed . id === 0 && processed . receptive === false && processed . data === VCLOSE_SIGNAL ; }