Skip to main content
Version: 3.x.x

Listener


import { Listener } from "@hyper-fetch/sockets"

Description

Defined in listener/listener.ts:6

Parameters

NameDetails

socket

Required

Socket<Adapter>

listenerOptions

Optional

ListenerOptionsType<ExtractListenerOptionsType<Adapter>>

Properties

listenerOptions

Description

Defined in listener/listener.ts:12

Type

ListenerOptionsType<ExtractListenerOptionsType<Adapter>>

name

Description

Defined in listener/listener.ts:7

Type

string

options

Description

Defined in listener/listener.ts:8

Type

ExtractListenerOptionsType<Adapter>

socket

Description

Defined in listener/listener.ts:11

Type

Socket<Adapter>

Methods

clone()

Preview

clone(config)

Description

Defined in listener/listener.ts:23

Parameters

NameDetails

config

Optional

Partial<ListenerOptionsType<ExtractListenerOptionsType<Adapter>>>

Return

Listener<Response, Adapter>

listen()

Preview

listen(callback)

Description

Defined in listener/listener.ts:31

Parameters

NameDetails

callback

Required

ListenerCallbackType<Response>

Return

readonly [() => void, ListenerCallbackType<Response>]

setOptions()

Preview

setOptions(options)

Description

Defined in listener/listener.ts:19

Parameters

NameDetails

options

Required

ExtractListenerOptionsType<Adapter>

Return

Listener<Response, Adapter>