Updated ServerRequest to IncomingMessage

This commit is contained in:
Toolbox
2016-09-09 01:17:15 -04:00
parent 17795ae18f
commit 21e1fc8534
Vendored
+4 -4
View File
@@ -21,7 +21,7 @@ declare module "ws" {
protocolVersion: string;
url: string;
supports: any;
upgradeReq: http.ServerRequest;
upgradeReq: http.IncomingMessage;
protocol: string;
CONNECTING: number;
@@ -76,8 +76,8 @@ declare module "ws" {
namespace WebSocket {
type VerifyClientCallbackSync = (info: {origin: string; secure: boolean; req: http.ServerRequest}) => boolean;
type VerifyClientCallbackAsync = (info: {origin: string; secure: boolean; req: http.ServerRequest}
type VerifyClientCallbackSync = (info: {origin: string; secure: boolean; req: http.IncomingMessage}) => boolean;
type VerifyClientCallbackAsync = (info: {origin: string; secure: boolean; req: http.IncomingMessage}
, callback: (res: boolean) => void) => void;
export interface IClientOptions {
@@ -116,7 +116,7 @@ declare module "ws" {
constructor(options?: IServerOptions, callback?: Function);
close(cb?: () => {}): void;
handleUpgrade(request: http.ServerRequest, socket: net.Socket,
handleUpgrade(request: http.IncomingMessage, socket: net.Socket,
upgradeHead: Buffer, callback: (client: WebSocket) => void): void;
// Events