Commit 9d9509f7 authored by indexzero's avatar indexzero

[doc] Small update to code docs

parent 4f85ca04
...@@ -312,6 +312,7 @@ HttpProxy.prototype.close = function () { ...@@ -312,6 +312,7 @@ HttpProxy.prototype.close = function () {
// #### @req {ServerRequest} Incoming HTTP Request to proxy. // #### @req {ServerRequest} Incoming HTTP Request to proxy.
// #### @res {ServerResponse} Outgoing HTTP Request to write proxied data to. // #### @res {ServerResponse} Outgoing HTTP Request to write proxied data to.
// #### @options {Object} Options for the outgoing proxy request. // #### @options {Object} Options for the outgoing proxy request.
//
// options.port {number} Port to use on the proxy target host. // options.port {number} Port to use on the proxy target host.
// options.host {string} Host of the proxy target. // options.host {string} Host of the proxy target.
// options.buffer {Object} Result from `httpProxy.buffer(req)` // options.buffer {Object} Result from `httpProxy.buffer(req)`
...@@ -552,6 +553,18 @@ HttpProxy.prototype._forwardRequest = function (req) { ...@@ -552,6 +553,18 @@ HttpProxy.prototype._forwardRequest = function (req) {
}); });
}; };
//
// ### function proxyWebSocketRequest (req, socket, head, options)
// #### @req {ServerRequest} Websocket request to proxy.
// #### @socket {net.Socket} Socket for the underlying HTTP request
// #### @head {string} Headers for the Websocket request.
// #### @options {Object} Options to use when proxying this request.
//
// options.port {number} Port to use on the proxy target host.
// options.host {string} Host of the proxy target.
// options.buffer {Object} Result from `httpProxy.buffer(req)`
// options.https {Object|boolean} Settings for https.
//
HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options) { HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options) {
var self = this, var self = this,
listeners = {}, listeners = {},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment