mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-09 15:08:12 -05:00
refactor: move the req attribute to the polling class
This commit is contained in:
@@ -54,7 +54,6 @@ export abstract class Transport extends EventEmitter {
|
||||
* @protected
|
||||
*/
|
||||
protected parser: any;
|
||||
protected req: EngineRequest;
|
||||
/**
|
||||
* Whether the transport supports binary payloads (else it will be base64-encoded)
|
||||
* @protected
|
||||
@@ -99,13 +98,10 @@ export abstract class Transport extends EventEmitter {
|
||||
/**
|
||||
* Called with an incoming HTTP request.
|
||||
*
|
||||
* @param {http.IncomingMessage} req
|
||||
* @param req
|
||||
* @package
|
||||
*/
|
||||
onRequest(req) {
|
||||
debug("setting request");
|
||||
this.req = req;
|
||||
}
|
||||
onRequest(req: any) {}
|
||||
|
||||
/**
|
||||
* Closes the transport.
|
||||
|
||||
@@ -15,6 +15,7 @@ export class Polling extends Transport {
|
||||
public maxHttpBufferSize: number;
|
||||
public httpCompression: any;
|
||||
|
||||
private req: HttpRequest & { cleanup: () => void };
|
||||
private res: HttpResponse;
|
||||
private dataReq: HttpRequest;
|
||||
private dataRes: HttpResponse;
|
||||
|
||||
@@ -16,6 +16,7 @@ export class Polling extends Transport {
|
||||
public maxHttpBufferSize: number;
|
||||
public httpCompression: any;
|
||||
|
||||
private req: EngineRequest;
|
||||
private res: ServerResponse;
|
||||
private dataReq: IncomingMessage;
|
||||
private dataRes: ServerResponse;
|
||||
|
||||
Reference in New Issue
Block a user