winccoa-manager
    Preparing search index...

    Interface ClientContext

    Interface representing the context of a service call on the client-side.

    interface ClientContext {
        get cancelSignal(): AbortSignal;
        set cancelSignal(signal: AbortSignal): void;
        get deadline(): null | Date;
        set deadline(deadline: null | WinccoaTime): void;
        get requestHeaders(): Vrpc.Metadata;
        addRequestHeader(
            key: string,
            value: string | Buffer<ArrayBufferLike>,
        ): void;
        clone(): Vrpc.ClientContext;
        getDeadlineAsMsSinceEpoch(): null | number;
    }
    Index

    Accessors

    • get cancelSignal(): AbortSignal

      Gets the AbortSignal for the client call. This signal can be used to cancel the client call.

      Returns AbortSignal

    • set cancelSignal(signal: AbortSignal): void

      Parameters

      • signal: AbortSignal

      Returns void

    • get deadline(): null | Date

      The deadline for the client call.

      Returns null | Date

      The deadline as a Date object, or null if no deadline is set.

    • set deadline(deadline: null | WinccoaTime): void

      Sets the deadline for the client call.

      Parameters

      • deadline: null | WinccoaTime

        The deadline as a Date object, number (ms since epoch), or null to clear the deadline.

      Returns void

    Methods

    • Adds a key-value pair to the headers associated with a client request call. The value can be an ASCII string or a binary value.

      Parameters

      • key: string

        The key for the header. If it is a binary value, it must end with "-bin". If it is an ASCII value, it must not end with "-bin".

      • value: string | Buffer<ArrayBufferLike>

        The value for the header, which can be a string or a Buffer.

      Returns void

    • Gets the deadline for the client call as number representing ms since epoch.

      Returns null | number

      The deadline as a number (ms since epoch), or null if no deadline is set.