UNPKG

fastify-uws

Version:

A performant HTTP and WebSocket server for Fastify with uWebSockets.

24 lines (23 loc) 781 B
import { Readable } from 'streamx'; import { default as uws } from 'uWebSockets.js'; import { HTTPSocket } from './http-socket'; import { kHeaders, kReq, kUrl } from './symbols'; export declare class Request extends Readable { socket: HTTPSocket; method: string; httpVersion: string; readableEnded: boolean; [kReq]: uws.HttpRequest; [kUrl]: string | null; [kHeaders]: Record<string, string> | null; constructor(req: uws.HttpRequest, socket: HTTPSocket, method: string); get aborted(): any; get url(): string; set url(url: string); get headers(): Record<string, string>; setEncoding(encoding: any): void; setTimeout(timeout: any): void; destroy(err: any): void; unpipe(writable: any): void; _read(cb: any): any; }