The redis server. Manages client request/response cycle.

Listens, by default, to env.DEFAULT_HOST (localhost) on port env.DEFAULT_PORT (6379)

Hierarchy

Constructors

Properties

logger: Logger = ...
server: Server = ...
serverContext: IServerContext
DEFAULT_HOST: string = ...
DEFAULT_PORT: string | number = ...
captureRejectionSymbol: typeof captureRejectionSymbol
captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

defaultMaxListeners: number
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Methods

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns RespServer

  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

  • Returns (string | symbol)[]

  • Parameters

    • type: string | symbol

    Returns number

  • Parameters

    • event: string | symbol

    Returns Function[]

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns RespServer

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns RespServer

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns RespServer

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns RespServer

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns RespServer

  • Parameters

    • event: string | symbol

    Returns Function[]

  • Receive the client request, convert it to RESP format, dispatch the request then respond to the client.

    Probably too busy. Should be refactored.

    Parameters

    • session: Session

      The client session (including socket)

    • message: any

      The client request

    Returns void

  • Register a client socket connection

    Parameters

    • socket: any

      client socket

    Returns void

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns RespServer

  • Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

    Deprecated

    since v4.0.0

  • Parameters

    Returns Promise<any[]>

  • Parameters

    Returns Promise<any[]>