@types/spdy

  • Version 3.4.9
  • Published
  • 6.58 kB
  • 1 dependency
  • MIT license

Install

npm i @types/spdy
yarn add @types/spdy
pnpm add @types/spdy

Overview

TypeScript definitions for spdy

Index

Functions

function createAgent

createAgent: {
(base: any, options: AgentOptions): Agent | PlainAgent;
(options: agent.AgentOptions): agent.Agent | agent.PlainAgent;
};

    function createServer

    createServer: {
    (
    base: any,
    options: ServerOptions,
    handler: (
    request: http.IncomingMessage,
    response: http.ServerResponse
    ) => void
    ): https.Server;
    (
    options: server.ServerOptions,
    handler: (
    request: http.IncomingMessage,
    response: http.ServerResponse
    ) => void
    ): https.Server;
    (
    handler: (
    request: http.IncomingMessage,
    response: http.ServerResponse
    ) => void
    ): https.Server;
    };

      Interfaces

      interface Handle

      interface Handle {}

        method assignClientRequest

        assignClientRequest: (req: any) => void;

          method assignRequest

          assignRequest: (req: any) => void;

            method assignResponse

            assignResponse: (res: any) => void;

              method assignSocket

              assignSocket: (socket: Socket, options: object) => void;

                method create

                create: (options: object, stream: any, socket: Socket) => Handle;

                  method emitRequest

                  emitRequest: () => void;

                    method emitResponse

                    emitResponse: (status: any, headers: any) => void;

                      method getStream

                      getStream: (callback?: (stream: any) => void) => any;

                        Type Aliases

                        type Agent

                        type Agent = agent.Agent;

                          type AgentOptions

                          type AgentOptions = agent.AgentOptions;

                            type IncomingMessage

                            type IncomingMessage = server.IncomingMessage;

                              type PlainAgent

                              type PlainAgent = agent.PlainAgent;

                                type PlainServer

                                type PlainServer = server.PlainServer;

                                  type Server

                                  type Server = server.Server;

                                    type ServerOptions

                                    type ServerOptions = server.ServerOptions;

                                      type ServerRequest

                                      type ServerRequest = server.IncomingMessage;

                                        type ServerResponse

                                        type ServerResponse = server.ServerResponse;

                                          type Socket

                                          type Socket = socket.Socket;

                                            Namespaces

                                            namespace agent

                                            namespace agent {}

                                              function create

                                              create: (base: any, options: AgentOptions) => Agent | PlainAgent;

                                                class Agent

                                                class Agent extends https.Agent {}

                                                  class PlainAgent

                                                  class PlainAgent extends http.Agent {}

                                                    interface AgentOptions

                                                    interface AgentOptions extends https.AgentOptions {}

                                                      property port

                                                      port?: number | undefined;

                                                        property spdy

                                                        spdy?:
                                                        | {
                                                        plain?: boolean | undefined;
                                                        ssl?: boolean | undefined;
                                                        'x-forwarded-for'?: string | undefined;
                                                        protocol?: string | undefined;
                                                        protocols?: string[] | undefined;
                                                        }
                                                        | undefined;

                                                          namespace request

                                                          namespace request {}

                                                            function onNewListener

                                                            onNewListener: (type: string) => void;

                                                              namespace response

                                                              namespace response {}

                                                                function end

                                                                end: (data: any, encoding: string, callback: () => void) => void;

                                                                  function writeHead

                                                                  writeHead: {
                                                                  (statusCode: number, reason: string, obj: object): void;
                                                                  (statusCode: number, obj: object): void;
                                                                  };

                                                                    namespace server

                                                                    namespace server {}

                                                                      function create

                                                                      create: {
                                                                      (
                                                                      base: any,
                                                                      options: https.ServerOptions,
                                                                      handler: (
                                                                      request: http.IncomingMessage,
                                                                      response: ServerResponse | http.ServerResponse
                                                                      ) => void
                                                                      ): https.Server;
                                                                      (
                                                                      options: https.ServerOptions,
                                                                      handler: (
                                                                      request: http.IncomingMessage,
                                                                      response: http.ServerResponse
                                                                      ) => void
                                                                      ): https.Server;
                                                                      (handler: (request: http.IncomingMessage, response: any) => void): https.Server;
                                                                      };

                                                                        interface PushOptions

                                                                        interface PushOptions {}

                                                                          property method

                                                                          method?: string | undefined;

                                                                            property request

                                                                            request?: any;

                                                                              property response

                                                                              response?: any;

                                                                                property status

                                                                                status?: number | undefined;

                                                                                  interface ServerOptions

                                                                                  interface ServerOptions extends https.ServerOptions {}

                                                                                    property spdy

                                                                                    spdy?:
                                                                                    | {
                                                                                    protocols?: Protocol[] | undefined;
                                                                                    plain?: boolean | undefined;
                                                                                    'x-forwarded-for'?: boolean | undefined;
                                                                                    connection?:
                                                                                    | {
                                                                                    windowSize?: number | undefined;
                                                                                    autoSpdy31?: boolean | undefined;
                                                                                    }
                                                                                    | undefined;
                                                                                    }
                                                                                    | undefined;

                                                                                      interface ServerResponse

                                                                                      interface ServerResponse extends http.ServerResponse {}

                                                                                        method push

                                                                                        push: (filename: string, options: PushOptions) => any;

                                                                                          type IncomingMessage

                                                                                          type IncomingMessage = http.IncomingMessage;

                                                                                            type PlainServer

                                                                                            type PlainServer = http.Server;

                                                                                              type Protocol

                                                                                              type Protocol = 'h2' | 'spdy/3.1' | 'spdy/3' | 'spdy/2' | 'http/1.1' | 'http/1.0';

                                                                                                type Server

                                                                                                type Server = https.Server;

                                                                                                  namespace socket

                                                                                                  namespace socket {}

                                                                                                    interface Socket

                                                                                                    interface Socket {}

                                                                                                      Package Files (1)

                                                                                                      Dependencies (1)

                                                                                                      Dev Dependencies (0)

                                                                                                      No dev dependencies.

                                                                                                      Peer Dependencies (0)

                                                                                                      No peer dependencies.

                                                                                                      Badge

                                                                                                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/spdy.

                                                                                                      • Markdown
                                                                                                        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/spdy)
                                                                                                      • HTML
                                                                                                        <a href="https://www.jsdocs.io/package/@types/spdy"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>