付智勇

no message

正在显示 48 个修改的文件 包含 4634 行增加40 行删除

要显示太多修改。

为保证性能只显示 48 of 48+ 个文件。

1 var Sequelize = require('sequelize'); 1 var Sequelize = require('sequelize');
2 //数据配置 2 //数据配置
3 -var sequelize = new Sequelize('guest', 'root', "", { 3 +var sequelize = new Sequelize('xuedianyun', 'root', "", {
4 host:'localhost', 4 host:'localhost',
5 dialect: 'mysql', 5 dialect: 'mysql',
6 pool: { 6 pool: {
@@ -9,26 +9,26 @@ var userController =function (){ @@ -9,26 +9,26 @@ var userController =function (){
9 9
10 }; 10 };
11 11
12 -var sleep = function (time) {  
13 - return new Promise(function (resolve, reject) {  
14 - setTimeout(function () {  
15 - console.log(2)  
16 - resolve();  
17 - }, time);  
18 - })  
19 -};  
20 userController.prototype.addUser = async(ctx, next) =>{ 12 userController.prototype.addUser = async(ctx, next) =>{
21 -  
22 - var user = {  
23 - id:uuid.db36(),  
24 - name:'555555',  
25 - age:11,  
26 - telephone:11112112,  
27 - password:saitMd5.md5AddSalt('123455').md5Pass  
28 - }  
29 - 13 + var params = ctx.request.body;
  14 + const pw = saitMd5.md5AddSalt(params.password)
  15 +
  16 + if(!params.loginName){
  17 + return status.paramError('loginName');
  18 + }else if(!params.password){
  19 + return status.paramError('password',' 不能为空');
  20 + }
  21 +
  22 + var user = {
  23 + loginName:params.loginName,
  24 + password:pw.md5Pass,
  25 + salt:pw.salt
  26 + }
  27 + try{
  28 + return await userService.addUser(user)
  29 + }catch (we){
30 30
31 - return await userService.addUser(user) 31 + }
32 32
33 } 33 }
34 module.exports = new userController(); 34 module.exports = new userController();
1 var sequelize = require('../config'); 1 var sequelize = require('../config');
2 var Sequelize = require('sequelize'); 2 var Sequelize = require('sequelize');
  3 +const uuid = require('../util/UuidUtil')
3 4
4 -var user = sequelize.define('user', { 5 +
  6 +var user = sequelize.define('3m_user', {
5 id: { 7 id: {
6 - type: Sequelize.STRING(36),  
7 - primaryKey: true 8 + type: Sequelize.STRING(32),
  9 + defaultValue:uuid.db32(),
  10 + allowNull: false,
  11 + unique: true,
  12 + primaryKey: true,
  13 + field: "id"
  14 + },
  15 + loginName: {
  16 + allowNull: false,
  17 + type:Sequelize.STRING(100),
  18 + field: "login_name"
  19 + },
  20 + password: {
  21 + allowNull: false,
  22 + type:Sequelize.STRING(100),
  23 + field: "password"
  24 + },
  25 + salt:{
  26 + type:Sequelize.INTEGER(2),
  27 + field: "salt"
  28 + },
  29 + companyName:{
  30 + type:Sequelize.STRING(1024),
  31 + field: "company_name"
  32 + },
  33 + userName:{
  34 + type:Sequelize.STRING(64),
  35 + field: "user_name"
  36 + },
  37 + userType:{
  38 + type:Sequelize.INTEGER(1),
  39 + field: "user_type"
  40 + },
  41 + userRole:{
  42 + type:Sequelize.INTEGER(1),
  43 + field: "user_role"
  44 + },
  45 + userEmail:{
  46 + type:Sequelize.INTEGER(1),
  47 + field: "user_email"
  48 + },
  49 + userMobile:{
  50 + type:Sequelize.STRING(32),
  51 + field: "user_mobile"
  52 + },
  53 + createTime:{
  54 + type:Sequelize.DATE,
  55 + defaultValue:Sequelize.NOW,
  56 + field: "create_time"
  57 + },
  58 + endTime:{
  59 + type:Sequelize.DATE,
  60 + defaultValue:Sequelize.NOW,
  61 + field: "end_time"
  62 + },
  63 + content:{
  64 + type:Sequelize.TEXT(1024),
  65 + field: "content"
  66 + },
  67 + serialNo:{
  68 + type:Sequelize.INTEGER(11),
  69 + field: "serial_no"
  70 + },
  71 + siteId:{
  72 + type:Sequelize.STRING(32),
  73 + field: "site_id"
  74 + },
  75 + userStatus:{
  76 + type:Sequelize.INTEGER(11),
  77 + field: "user_status"
  78 + },
  79 + groupId:{
  80 + type:Sequelize.STRING(128),
  81 + field: "group_id"
8 }, 82 },
9 - name: Sequelize.STRING(100),  
10 - age: Sequelize.BIGINT(11),  
11 - telephone: Sequelize.BIGINT(11),  
12 - password:Sequelize.STRING(36)  
13 }, { 83 }, {
14 timestamps: false, 84 timestamps: false,
15 freezeTableName: true 85 freezeTableName: true
1 { 1 {
2 - "_from": "co@^4.6.0", 2 + "_args": [
  3 + [
  4 + {
  5 + "raw": "co",
  6 + "scope": null,
  7 + "escapedName": "co",
  8 + "name": "co",
  9 + "rawSpec": "",
  10 + "spec": "latest",
  11 + "type": "tag"
  12 + },
  13 + "/Users/fzy/project/koa2_Sequelize_project"
  14 + ]
  15 + ],
  16 + "_from": "co@latest",
3 "_id": "co@4.6.0", 17 "_id": "co@4.6.0",
4 - "_inBundle": false,  
5 - "_integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", 18 + "_inCache": true,
6 "_location": "/co", 19 "_location": "/co",
  20 + "_nodeVersion": "2.3.3",
  21 + "_npmUser": {
  22 + "name": "jongleberry",
  23 + "email": "jonathanrichardong@gmail.com"
  24 + },
  25 + "_npmVersion": "2.11.3",
7 "_phantomChildren": {}, 26 "_phantomChildren": {},
8 "_requested": { 27 "_requested": {
9 - "type": "range",  
10 - "registry": true,  
11 - "raw": "co@^4.6.0",  
12 - "name": "co", 28 + "raw": "co",
  29 + "scope": null,
13 "escapedName": "co", 30 "escapedName": "co",
14 - "rawSpec": "^4.6.0",  
15 - "saveSpec": null,  
16 - "fetchSpec": "^4.6.0" 31 + "name": "co",
  32 + "rawSpec": "",
  33 + "spec": "latest",
  34 + "type": "tag"
17 }, 35 },
18 "_requiredBy": [ 36 "_requiredBy": [
  37 + "#USER",
19 "/koa-convert", 38 "/koa-convert",
20 "/koa-send" 39 "/koa-send"
21 ], 40 ],
22 "_resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", 41 "_resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
23 "_shasum": "6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184", 42 "_shasum": "6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184",
24 - "_spec": "co@^4.6.0",  
25 - "_where": "/Users/fzy/project/efang/node_modules/koa-convert", 43 + "_shrinkwrap": null,
  44 + "_spec": "co",
  45 + "_where": "/Users/fzy/project/koa2_Sequelize_project",
26 "bugs": { 46 "bugs": {
27 "url": "https://github.com/tj/co/issues" 47 "url": "https://github.com/tj/co/issues"
28 }, 48 },
29 - "bundleDependencies": false,  
30 - "deprecated": false, 49 + "dependencies": {},
31 "description": "generator async control flow goodness", 50 "description": "generator async control flow goodness",
32 "devDependencies": { 51 "devDependencies": {
33 "browserify": "^10.0.0", 52 "browserify": "^10.0.0",
@@ -35,6 +54,11 @@ @@ -35,6 +54,11 @@
35 "mocha": "^2.0.0", 54 "mocha": "^2.0.0",
36 "mz": "^1.0.2" 55 "mz": "^1.0.2"
37 }, 56 },
  57 + "directories": {},
  58 + "dist": {
  59 + "shasum": "6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184",
  60 + "tarball": "https://registry.npmjs.org/co/-/co-4.6.0.tgz"
  61 + },
38 "engines": { 62 "engines": {
39 "iojs": ">= 1.0.0", 63 "iojs": ">= 1.0.0",
40 "node": ">= 0.12.0" 64 "node": ">= 0.12.0"
@@ -42,6 +66,7 @@ @@ -42,6 +66,7 @@
42 "files": [ 66 "files": [
43 "index.js" 67 "index.js"
44 ], 68 ],
  69 + "gitHead": "b54d18f8f472ad1314800e786993c4169a5ff9f8",
45 "homepage": "https://github.com/tj/co#readme", 70 "homepage": "https://github.com/tj/co#readme",
46 "keywords": [ 71 "keywords": [
47 "async", 72 "async",
@@ -51,7 +76,24 @@ @@ -51,7 +76,24 @@
51 "coroutine" 76 "coroutine"
52 ], 77 ],
53 "license": "MIT", 78 "license": "MIT",
  79 + "maintainers": [
  80 + {
  81 + "name": "tjholowaychuk",
  82 + "email": "tj@vision-media.ca"
  83 + },
  84 + {
  85 + "name": "jonathanong",
  86 + "email": "jonathanrichardong@gmail.com"
  87 + },
  88 + {
  89 + "name": "jongleberry",
  90 + "email": "jonathanrichardong@gmail.com"
  91 + }
  92 + ],
54 "name": "co", 93 "name": "co",
  94 + "optionalDependencies": {},
  95 + "readme": "# co\n\n[![Gitter][gitter-image]][gitter-url]\n[![NPM version][npm-image]][npm-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Downloads][downloads-image]][downloads-url]\n\n Generator based control flow goodness for nodejs and the browser,\n using promises, letting you write non-blocking code in a nice-ish way.\n\n## Co v4\n\n `co@4.0.0` has been released, which now relies on promises.\n It is a stepping stone towards [ES7 async/await](https://github.com/lukehoban/ecmascript-asyncawait).\n The primary API change is how `co()` is invoked.\n Before, `co` returned a \"thunk\", which you then called with a callback and optional arguments.\n Now, `co()` returns a promise.\n\n```js\nco(function* () {\n var result = yield Promise.resolve(true);\n return result;\n}).then(function (value) {\n console.log(value);\n}, function (err) {\n console.error(err.stack);\n});\n```\n\n If you want to convert a `co`-generator-function into a regular function that returns a promise,\n you now use `co.wrap(fn*)`.\n\n```js\nvar fn = co.wrap(function* (val) {\n return yield Promise.resolve(val);\n});\n\nfn(true).then(function (val) {\n\n});\n```\n\n## Platform Compatibility\n\n `co@4+` requires a `Promise` implementation.\n For versions of node `< 0.11` and for many older browsers,\n you should/must include your own `Promise` polyfill.\n\n When using node 0.11.x or greater, you must use the `--harmony-generators`\n flag or just `--harmony` to get access to generators.\n\n When using node 0.10.x and lower or browsers without generator support,\n you must use [gnode](https://github.com/TooTallNate/gnode) and/or [regenerator](http://facebook.github.io/regenerator/).\n\n io.js is supported out of the box, you can use `co` without flags or polyfills.\n\n## Installation\n\n```\n$ npm install co\n```\n\n## Associated libraries\n\nAny library that returns promises work well with `co`.\n\n- [mz](https://github.com/normalize/mz) - wrap all of node's code libraries as promises.\n\nView the [wiki](https://github.com/visionmedia/co/wiki) for more libraries.\n\n## Examples\n\n```js\nvar co = require('co');\n\nco(function *(){\n // yield any promise\n var result = yield Promise.resolve(true);\n}).catch(onerror);\n\nco(function *(){\n // resolve multiple promises in parallel\n var a = Promise.resolve(1);\n var b = Promise.resolve(2);\n var c = Promise.resolve(3);\n var res = yield [a, b, c];\n console.log(res);\n // => [1, 2, 3]\n}).catch(onerror);\n\n// errors can be try/catched\nco(function *(){\n try {\n yield Promise.reject(new Error('boom'));\n } catch (err) {\n console.error(err.message); // \"boom\"\n }\n}).catch(onerror);\n\nfunction onerror(err) {\n // log any uncaught errors\n // co will not throw any errors you do not handle!!!\n // HANDLE ALL YOUR ERRORS!!!\n console.error(err.stack);\n}\n```\n\n## Yieldables\n\n The `yieldable` objects currently supported are:\n\n - promises\n - thunks (functions)\n - array (parallel execution)\n - objects (parallel execution)\n - generators (delegation)\n - generator functions (delegation)\n\nNested `yieldable` objects are supported, meaning you can nest\npromises within objects within arrays, and so on!\n\n### Promises\n\n[Read more on promises!](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\n\n### Thunks\n\nThunks are functions that only have a single argument, a callback.\nThunk support only remains for backwards compatibility and may\nbe removed in future versions of `co`.\n\n### Arrays\n\n`yield`ing an array will resolve all the `yieldables` in parallel.\n\n```js\nco(function* () {\n var res = yield [\n Promise.resolve(1),\n Promise.resolve(2),\n Promise.resolve(3),\n ];\n console.log(res); // => [1, 2, 3]\n}).catch(onerror);\n```\n\n### Objects\n\nJust like arrays, objects resolve all `yieldable`s in parallel.\n\n```js\nco(function* () {\n var res = yield {\n 1: Promise.resolve(1),\n 2: Promise.resolve(2),\n };\n console.log(res); // => { 1: 1, 2: 2 }\n}).catch(onerror);\n```\n\n### Generators and Generator Functions\n\nAny generator or generator function you can pass into `co`\ncan be yielded as well. This should generally be avoided\nas we should be moving towards spec-compliant `Promise`s instead.\n\n## API\n\n### co(fn*).then( val => )\n\nReturns a promise that resolves a generator, generator function,\nor any function that returns a generator.\n\n```js\nco(function* () {\n return yield Promise.resolve(true);\n}).then(function (val) {\n console.log(val);\n}, function (err) {\n console.error(err.stack);\n});\n```\n\n### var fn = co.wrap(fn*)\n\nConvert a generator into a regular function that returns a `Promise`.\n\n```js\nvar fn = co.wrap(function* (val) {\n return yield Promise.resolve(val);\n});\n\nfn(true).then(function (val) {\n\n});\n```\n\n## License\n\n MIT\n\n[npm-image]: https://img.shields.io/npm/v/co.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/co\n[travis-image]: https://img.shields.io/travis/tj/co.svg?style=flat-square\n[travis-url]: https://travis-ci.org/tj/co\n[coveralls-image]: https://img.shields.io/coveralls/tj/co.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/tj/co\n[downloads-image]: http://img.shields.io/npm/dm/co.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/co\n[gitter-image]: https://badges.gitter.im/Join%20Chat.svg\n[gitter-url]: https://gitter.im/tj/co?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n",
  96 + "readmeFilename": "Readme.md",
55 "repository": { 97 "repository": {
56 "type": "git", 98 "type": "git",
57 "url": "git+https://github.com/tj/co.git" 99 "url": "git+https://github.com/tj/co.git"
  1 +Copyright (c) 2016 Alex Hultman and contributors
  2 +
  3 +This software is provided 'as-is', without any express or implied
  4 +warranty. In no event will the authors be held liable for any damages
  5 +arising from the use of this software.
  6 +
  7 +Permission is granted to anyone to use this software for any purpose,
  8 +including commercial applications, and to alter it and redistribute it
  9 +freely, subject to the following restrictions:
  10 +
  11 +1. The origin of this software must not be misrepresented; you must not
  12 + claim that you wrote the original software. If you use this software
  13 + in a product, an acknowledgement in the product documentation would be
  14 + appreciated but is not required.
  15 +2. Altered source versions must be plainly marked as such, and must not be
  16 + misrepresented as being the original software.
  17 +3. This notice may not be removed or altered from any source distribution.
  1 +## Usage
  2 +`uws` tries to mimic `ws` as closely as possible without sacrificing too much performance. In most cases you simply swap `require('ws')` with `require('uws')`:
  3 +
  4 +```javascript
  5 +var WebSocketServer = require('uws').Server;
  6 +var wss = new WebSocketServer({ port: 3000 });
  7 +
  8 +function onMessage(message) {
  9 + console.log('received: ' + message);
  10 +}
  11 +
  12 +wss.on('connection', function(ws) {
  13 + ws.on('message', onMessage);
  14 + ws.send('something');
  15 +});
  16 +```
  17 +
  18 +##### Deviations from ws
  19 +There are some important incompatibilities with `ws` though, we aim to be ~90% compatible but will never implement behavior that is deemed too inefficient:
  20 +
  21 +* Binary data is passed zero-copy as an `ArrayBuffer`. This means you need to copy it to keep it past the callback. It also means you need to convert it with `Buffer.from(message)` if you expect a `Node.js Buffer`.
  22 +* `webSocket._socket` is not a `net.Socket`, it is just a getter function with very basic functionalities.
  23 +* `webSocket._socket.remote...` might fail, you need to cache it at connection.
  24 +* `webSocket` acts like an `EventEmitter` with one listener per event maximum.
  25 +* `webSocket.upgradeReq` is only valid during execution of the connection handler. If you want to keep properties of the upgradeReq for the entire lifetime of the webSocket you better attach that specific property to the webSocket at connection.
  26 +
  27 +## Installation
  28 +[![](https://nodei.co/npm/uws.png)](https://www.npmjs.com/package/uws)
  29 +
  30 +At installation `uws` will try to recompile itself using the system's C++11 compiler (GCC 4.8+, Clang 3.3, VC++ 2015+).
  31 +If this fails it will silently fall back to using the precompiled binaries.
  32 +NPM installation will never fail but `require('uws')` will throw if it cannot properly load the binary module.
  1 +{
  2 + 'targets': [
  3 + {
  4 + 'target_name': 'uws',
  5 + 'sources': [
  6 + 'src/Extensions.cpp',
  7 + 'src/Group.cpp',
  8 + 'src/Networking.cpp',
  9 + 'src/Hub.cpp',
  10 + 'src/Node.cpp',
  11 + 'src/WebSocket.cpp',
  12 + 'src/HTTPSocket.cpp',
  13 + 'src/Socket.cpp',
  14 + 'src/addon.cpp'
  15 + ],
  16 + 'conditions': [
  17 + ['OS=="linux"', {
  18 + 'cflags_cc': [ '-std=c++11', '-DUSE_LIBUV' ],
  19 + 'cflags_cc!': [ '-fno-exceptions', '-std=gnu++0x', '-fno-rtti' ],
  20 + 'cflags!': [ '-fno-omit-frame-pointer' ],
  21 + 'ldflags!': [ '-rdynamic' ],
  22 + 'ldflags': [ '-s' ]
  23 + }],
  24 + ['OS=="mac"', {
  25 + 'xcode_settings': {
  26 + 'MACOSX_DEPLOYMENT_TARGET': '10.7',
  27 + 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
  28 + 'CLANG_CXX_LIBRARY': 'libc++',
  29 + 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
  30 + 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
  31 + 'GCC_THREADSAFE_STATICS': 'YES',
  32 + 'GCC_OPTIMIZATION_LEVEL': '3',
  33 + 'GCC_ENABLE_CPP_RTTI': 'YES',
  34 + 'OTHER_CFLAGS!': [ '-fno-strict-aliasing' ],
  35 + 'OTHER_CPLUSPLUSFLAGS': [ '-DUSE_LIBUV' ]
  36 + }
  37 + }],
  38 + ['OS=="win"', {
  39 + 'cflags_cc': [ '/DUSE_LIBUV' ],
  40 + 'cflags_cc!': []
  41 + }]
  42 + ]
  43 + },
  44 + {
  45 + 'target_name': 'action_after_build',
  46 + 'type': 'none',
  47 + 'dependencies': [ 'uws' ],
  48 + 'conditions': [
  49 + ['OS!="win"', {
  50 + 'actions': [
  51 + {
  52 + 'action_name': 'move_lib',
  53 + 'inputs': [
  54 + '<@(PRODUCT_DIR)/uws.node'
  55 + ],
  56 + 'outputs': [
  57 + 'uws'
  58 + ],
  59 + 'action': ['cp', '<@(PRODUCT_DIR)/uws.node', 'uws_<!@(node -p process.platform)_<!@(node -p process.versions.modules).node']
  60 + }
  61 + ]}
  62 + ],
  63 + ['OS=="win"', {
  64 + 'actions': [
  65 + {
  66 + 'action_name': 'move_lib',
  67 + 'inputs': [
  68 + '<@(PRODUCT_DIR)/uws.node'
  69 + ],
  70 + 'outputs': [
  71 + 'uws'
  72 + ],
  73 + 'action': ['copy', '<@(PRODUCT_DIR)/uws.node', 'uws_<!@(node -p process.platform)_<!@(node -p process.versions.modules).node']
  74 + }
  75 + ]}
  76 + ]
  77 + ]
  78 + }
  79 + ]
  80 +}
  1 +# We borrow heavily from the kernel build setup, though we are simpler since
  2 +# we don't have Kconfig tweaking settings on us.
  3 +
  4 +# The implicit make rules have it looking for RCS files, among other things.
  5 +# We instead explicitly write all the rules we care about.
  6 +# It's even quicker (saves ~200ms) to pass -r on the command line.
  7 +MAKEFLAGS=-r
  8 +
  9 +# The source directory tree.
  10 +srcdir := ..
  11 +abs_srcdir := $(abspath $(srcdir))
  12 +
  13 +# The name of the builddir.
  14 +builddir_name ?= .
  15 +
  16 +# The V=1 flag on command line makes us verbosely print command lines.
  17 +ifdef V
  18 + quiet=
  19 +else
  20 + quiet=quiet_
  21 +endif
  22 +
  23 +# Specify BUILDTYPE=Release on the command line for a release build.
  24 +BUILDTYPE ?= Release
  25 +
  26 +# Directory all our build output goes into.
  27 +# Note that this must be two directories beneath src/ for unit tests to pass,
  28 +# as they reach into the src/ directory for data with relative paths.
  29 +builddir ?= $(builddir_name)/$(BUILDTYPE)
  30 +abs_builddir := $(abspath $(builddir))
  31 +depsdir := $(builddir)/.deps
  32 +
  33 +# Object output directory.
  34 +obj := $(builddir)/obj
  35 +abs_obj := $(abspath $(obj))
  36 +
  37 +# We build up a list of every single one of the targets so we can slurp in the
  38 +# generated dependency rule Makefiles in one pass.
  39 +all_deps :=
  40 +
  41 +
  42 +
  43 +CC.target ?= $(CC)
  44 +CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS)
  45 +CXX.target ?= $(CXX)
  46 +CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS)
  47 +LINK.target ?= $(LINK)
  48 +LDFLAGS.target ?= $(LDFLAGS)
  49 +AR.target ?= $(AR)
  50 +
  51 +# C++ apps need to be linked with g++.
  52 +LINK ?= $(CXX.target)
  53 +
  54 +# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
  55 +# to replicate this environment fallback in make as well.
  56 +CC.host ?= gcc
  57 +CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host)
  58 +CXX.host ?= g++
  59 +CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
  60 +LINK.host ?= $(CXX.host)
  61 +LDFLAGS.host ?=
  62 +AR.host ?= ar
  63 +
  64 +# Define a dir function that can handle spaces.
  65 +# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
  66 +# "leading spaces cannot appear in the text of the first argument as written.
  67 +# These characters can be put into the argument value by variable substitution."
  68 +empty :=
  69 +space := $(empty) $(empty)
  70 +
  71 +# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
  72 +replace_spaces = $(subst $(space),?,$1)
  73 +unreplace_spaces = $(subst ?,$(space),$1)
  74 +dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
  75 +
  76 +# Flags to make gcc output dependency info. Note that you need to be
  77 +# careful here to use the flags that ccache and distcc can understand.
  78 +# We write to a dep file on the side first and then rename at the end
  79 +# so we can't end up with a broken dep file.
  80 +depfile = $(depsdir)/$(call replace_spaces,$@).d
  81 +DEPFLAGS = -MMD -MF $(depfile).raw
  82 +
  83 +# We have to fixup the deps output in a few ways.
  84 +# (1) the file output should mention the proper .o file.
  85 +# ccache or distcc lose the path to the target, so we convert a rule of
  86 +# the form:
  87 +# foobar.o: DEP1 DEP2
  88 +# into
  89 +# path/to/foobar.o: DEP1 DEP2
  90 +# (2) we want missing files not to cause us to fail to build.
  91 +# We want to rewrite
  92 +# foobar.o: DEP1 DEP2 \
  93 +# DEP3
  94 +# to
  95 +# DEP1:
  96 +# DEP2:
  97 +# DEP3:
  98 +# so if the files are missing, they're just considered phony rules.
  99 +# We have to do some pretty insane escaping to get those backslashes
  100 +# and dollar signs past make, the shell, and sed at the same time.
  101 +# Doesn't work with spaces, but that's fine: .d files have spaces in
  102 +# their names replaced with other characters.
  103 +define fixup_dep
  104 +# The depfile may not exist if the input file didn't have any #includes.
  105 +touch $(depfile).raw
  106 +# Fixup path as in (1).
  107 +sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
  108 +# Add extra rules as in (2).
  109 +# We remove slashes and replace spaces with new lines;
  110 +# remove blank lines;
  111 +# delete the first line and append a colon to the remaining lines.
  112 +sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
  113 + grep -v '^$$' |\
  114 + sed -e 1d -e 's|$$|:|' \
  115 + >> $(depfile)
  116 +rm $(depfile).raw
  117 +endef
  118 +
  119 +# Command definitions:
  120 +# - cmd_foo is the actual command to run;
  121 +# - quiet_cmd_foo is the brief-output summary of the command.
  122 +
  123 +quiet_cmd_cc = CC($(TOOLSET)) $@
  124 +cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
  125 +
  126 +quiet_cmd_cxx = CXX($(TOOLSET)) $@
  127 +cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
  128 +
  129 +quiet_cmd_objc = CXX($(TOOLSET)) $@
  130 +cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
  131 +
  132 +quiet_cmd_objcxx = CXX($(TOOLSET)) $@
  133 +cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
  134 +
  135 +# Commands for precompiled header files.
  136 +quiet_cmd_pch_c = CXX($(TOOLSET)) $@
  137 +cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
  138 +quiet_cmd_pch_cc = CXX($(TOOLSET)) $@
  139 +cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
  140 +quiet_cmd_pch_m = CXX($(TOOLSET)) $@
  141 +cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
  142 +quiet_cmd_pch_mm = CXX($(TOOLSET)) $@
  143 +cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
  144 +
  145 +# gyp-mac-tool is written next to the root Makefile by gyp.
  146 +# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd
  147 +# already.
  148 +quiet_cmd_mac_tool = MACTOOL $(4) $<
  149 +cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@"
  150 +
  151 +quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@
  152 +cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4)
  153 +
  154 +quiet_cmd_infoplist = INFOPLIST $@
  155 +cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@"
  156 +
  157 +quiet_cmd_touch = TOUCH $@
  158 +cmd_touch = touch $@
  159 +
  160 +quiet_cmd_copy = COPY $@
  161 +# send stderr to /dev/null to ignore messages when linking directories.
  162 +cmd_copy = rm -rf "$@" && cp -af "$<" "$@"
  163 +
  164 +quiet_cmd_alink = LIBTOOL-STATIC $@
  165 +cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
  166 +
  167 +quiet_cmd_link = LINK($(TOOLSET)) $@
  168 +cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
  169 +
  170 +quiet_cmd_solink = SOLINK($(TOOLSET)) $@
  171 +cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
  172 +
  173 +quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
  174 +cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
  175 +
  176 +
  177 +# Define an escape_quotes function to escape single quotes.
  178 +# This allows us to handle quotes properly as long as we always use
  179 +# use single quotes and escape_quotes.
  180 +escape_quotes = $(subst ','\'',$(1))
  181 +# This comment is here just to include a ' to unconfuse syntax highlighting.
  182 +# Define an escape_vars function to escape '$' variable syntax.
  183 +# This allows us to read/write command lines with shell variables (e.g.
  184 +# $LD_LIBRARY_PATH), without triggering make substitution.
  185 +escape_vars = $(subst $$,$$$$,$(1))
  186 +# Helper that expands to a shell command to echo a string exactly as it is in
  187 +# make. This uses printf instead of echo because printf's behaviour with respect
  188 +# to escape sequences is more portable than echo's across different shells
  189 +# (e.g., dash, bash).
  190 +exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
  191 +
  192 +# Helper to compare the command we're about to run against the command
  193 +# we logged the last time we ran the command. Produces an empty
  194 +# string (false) when the commands match.
  195 +# Tricky point: Make has no string-equality test function.
  196 +# The kernel uses the following, but it seems like it would have false
  197 +# positives, where one string reordered its arguments.
  198 +# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
  199 +# $(filter-out $(cmd_$@), $(cmd_$(1))))
  200 +# We instead substitute each for the empty string into the other, and
  201 +# say they're equal if both substitutions produce the empty string.
  202 +# .d files contain ? instead of spaces, take that into account.
  203 +command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
  204 + $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
  205 +
  206 +# Helper that is non-empty when a prerequisite changes.
  207 +# Normally make does this implicitly, but we force rules to always run
  208 +# so we can check their command lines.
  209 +# $? -- new prerequisites
  210 +# $| -- order-only dependencies
  211 +prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
  212 +
  213 +# Helper that executes all postbuilds until one fails.
  214 +define do_postbuilds
  215 + @E=0;\
  216 + for p in $(POSTBUILDS); do\
  217 + eval $$p;\
  218 + E=$$?;\
  219 + if [ $$E -ne 0 ]; then\
  220 + break;\
  221 + fi;\
  222 + done;\
  223 + if [ $$E -ne 0 ]; then\
  224 + rm -rf "$@";\
  225 + exit $$E;\
  226 + fi
  227 +endef
  228 +
  229 +# do_cmd: run a command via the above cmd_foo names, if necessary.
  230 +# Should always run for a given target to handle command-line changes.
  231 +# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
  232 +# Third argument, if non-zero, makes it do POSTBUILDS processing.
  233 +# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
  234 +# spaces already and dirx strips the ? characters.
  235 +define do_cmd
  236 +$(if $(or $(command_changed),$(prereq_changed)),
  237 + @$(call exact_echo, $($(quiet)cmd_$(1)))
  238 + @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
  239 + $(if $(findstring flock,$(word 2,$(cmd_$1))),
  240 + @$(cmd_$(1))
  241 + @echo " $(quiet_cmd_$(1)): Finished",
  242 + @$(cmd_$(1))
  243 + )
  244 + @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
  245 + @$(if $(2),$(fixup_dep))
  246 + $(if $(and $(3), $(POSTBUILDS)),
  247 + $(call do_postbuilds)
  248 + )
  249 +)
  250 +endef
  251 +
  252 +# Declare the "all" target first so it is the default,
  253 +# even though we don't have the deps yet.
  254 +.PHONY: all
  255 +all:
  256 +
  257 +# make looks for ways to re-generate included makefiles, but in our case, we
  258 +# don't have a direct way. Explicitly telling make that it has nothing to do
  259 +# for them makes it go faster.
  260 +%.d: ;
  261 +
  262 +# Use FORCE_DO_CMD to force a target to run. Should be coupled with
  263 +# do_cmd.
  264 +.PHONY: FORCE_DO_CMD
  265 +FORCE_DO_CMD:
  266 +
  267 +TOOLSET := target
  268 +# Suffix rules, putting all outputs into $(obj).
  269 +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
  270 + @$(call do_cmd,cc,1)
  271 +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
  272 + @$(call do_cmd,cxx,1)
  273 +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
  274 + @$(call do_cmd,cxx,1)
  275 +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
  276 + @$(call do_cmd,cxx,1)
  277 +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.m FORCE_DO_CMD
  278 + @$(call do_cmd,objc,1)
  279 +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.mm FORCE_DO_CMD
  280 + @$(call do_cmd,objcxx,1)
  281 +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
  282 + @$(call do_cmd,cc,1)
  283 +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
  284 + @$(call do_cmd,cc,1)
  285 +
  286 +# Try building from generated source, too.
  287 +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
  288 + @$(call do_cmd,cc,1)
  289 +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
  290 + @$(call do_cmd,cxx,1)
  291 +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
  292 + @$(call do_cmd,cxx,1)
  293 +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
  294 + @$(call do_cmd,cxx,1)
  295 +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.m FORCE_DO_CMD
  296 + @$(call do_cmd,objc,1)
  297 +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.mm FORCE_DO_CMD
  298 + @$(call do_cmd,objcxx,1)
  299 +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
  300 + @$(call do_cmd,cc,1)
  301 +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
  302 + @$(call do_cmd,cc,1)
  303 +
  304 +$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
  305 + @$(call do_cmd,cc,1)
  306 +$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
  307 + @$(call do_cmd,cxx,1)
  308 +$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
  309 + @$(call do_cmd,cxx,1)
  310 +$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
  311 + @$(call do_cmd,cxx,1)
  312 +$(obj).$(TOOLSET)/%.o: $(obj)/%.m FORCE_DO_CMD
  313 + @$(call do_cmd,objc,1)
  314 +$(obj).$(TOOLSET)/%.o: $(obj)/%.mm FORCE_DO_CMD
  315 + @$(call do_cmd,objcxx,1)
  316 +$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
  317 + @$(call do_cmd,cc,1)
  318 +$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
  319 + @$(call do_cmd,cc,1)
  320 +
  321 +
  322 +ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
  323 + $(findstring $(join ^,$(prefix)),\
  324 + $(join ^,action_after_build.target.mk)))),)
  325 + include action_after_build.target.mk
  326 +endif
  327 +ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
  328 + $(findstring $(join ^,$(prefix)),\
  329 + $(join ^,uws.target.mk)))),)
  330 + include uws.target.mk
  331 +endif
  332 +
  333 +quiet_cmd_regen_makefile = ACTION Regenerating $@
  334 +cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/Users/fzy/project/koa2_Sequelize_project/node_modules/uws/build/config.gypi -I/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/fzy/.node-gyp/8.2.1/include/node/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/fzy/.node-gyp/8.2.1" "-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=node.lib" "-Dmodule_root_dir=/Users/fzy/project/koa2_Sequelize_project/node_modules/uws" "-Dnode_engine=v8" binding.gyp
  335 +Makefile: $(srcdir)/../../../../.node-gyp/8.2.1/include/node/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
  336 + $(call do_cmd,regen_makefile)
  337 +
  338 +# "all" is a concatenation of the "all" targets from all the included
  339 +# sub-makefiles. This is just here to clarify.
  340 +all:
  341 +
  342 +# Add in dependency-tracking rules. $(all_deps) is the list of every single
  343 +# target in our tree. Only consider the ones with .d (dependency) info:
  344 +d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
  345 +ifneq ($(d_files),)
  346 + include $(d_files)
  347 +endif
  1 +cmd_Release/obj.target/action_after_build.stamp := touch Release/obj.target/action_after_build.stamp
  1 +cmd_Release/obj.target/uws/src/Extensions.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/fzy/.node-gyp/8.2.1/include/node -I/Users/fzy/.node-gyp/8.2.1/src -I/Users/fzy/.node-gyp/8.2.1/deps/uv/include -I/Users/fzy/.node-gyp/8.2.1/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Extensions.o.d.raw -c -o Release/obj.target/uws/src/Extensions.o ../src/Extensions.cpp
  2 +Release/obj.target/uws/src/Extensions.o: ../src/Extensions.cpp \
  3 + ../src/Extensions.h
  4 +../src/Extensions.cpp:
  5 +../src/Extensions.h:
  1 +cmd_Release/obj.target/uws/src/Group.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/fzy/.node-gyp/8.2.1/include/node -I/Users/fzy/.node-gyp/8.2.1/src -I/Users/fzy/.node-gyp/8.2.1/deps/uv/include -I/Users/fzy/.node-gyp/8.2.1/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Group.o.d.raw -c -o Release/obj.target/uws/src/Group.o ../src/Group.cpp
  2 +Release/obj.target/uws/src/Group.o: ../src/Group.cpp ../src/Group.h \
  3 + ../src/WebSocket.h ../src/WebSocketProtocol.h ../src/Networking.h \
  4 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
  5 + ../src/Backend.h ../src/Libuv.h \
  6 + /Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
  7 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
  8 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
  9 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
  10 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
  11 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
  12 + /Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
  13 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
  14 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
  15 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
  16 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
  17 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
  18 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
  19 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
  20 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
  21 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
  22 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
  23 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
  24 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
  25 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
  26 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
  27 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
  28 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
  29 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
  30 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
  31 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
  32 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
  33 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
  34 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
  35 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
  36 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
  37 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
  38 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
  39 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
  40 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
  41 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
  42 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
  43 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
  44 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
  45 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
  46 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
  47 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
  48 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
  49 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
  50 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
  51 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h ../src/Socket.h \
  52 + ../src/HTTPSocket.h ../src/Extensions.h ../src/Hub.h ../src/Node.h \
  53 + /Users/fzy/.node-gyp/8.2.1/include/node/zlib.h \
  54 + /Users/fzy/.node-gyp/8.2.1/include/node/zconf.h
  55 +../src/Group.cpp:
  56 +../src/Group.h:
  57 +../src/WebSocket.h:
  58 +../src/WebSocketProtocol.h:
  59 +../src/Networking.h:
  60 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
  61 +../src/Backend.h:
  62 +../src/Libuv.h:
  63 +/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
  64 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
  65 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
  66 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
  67 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
  68 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
  69 +/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
  70 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
  71 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
  72 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
  73 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
  74 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
  75 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
  76 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
  77 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
  78 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
  79 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
  80 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
  81 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
  82 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
  83 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
  84 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
  85 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
  86 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
  87 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
  88 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
  89 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
  90 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
  91 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
  92 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
  93 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
  94 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
  95 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
  96 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
  97 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
  98 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
  99 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
  100 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
  101 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
  102 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
  103 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
  104 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
  105 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
  106 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
  107 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
  108 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
  109 +../src/Socket.h:
  110 +../src/HTTPSocket.h:
  111 +../src/Extensions.h:
  112 +../src/Hub.h:
  113 +../src/Node.h:
  114 +/Users/fzy/.node-gyp/8.2.1/include/node/zlib.h:
  115 +/Users/fzy/.node-gyp/8.2.1/include/node/zconf.h:
  1 +cmd_Release/obj.target/uws/src/HTTPSocket.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/fzy/.node-gyp/8.2.1/include/node -I/Users/fzy/.node-gyp/8.2.1/src -I/Users/fzy/.node-gyp/8.2.1/deps/uv/include -I/Users/fzy/.node-gyp/8.2.1/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/HTTPSocket.o.d.raw -c -o Release/obj.target/uws/src/HTTPSocket.o ../src/HTTPSocket.cpp
  2 +Release/obj.target/uws/src/HTTPSocket.o: ../src/HTTPSocket.cpp \
  3 + ../src/HTTPSocket.h ../src/Socket.h ../src/Networking.h \
  4 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
  5 + ../src/Backend.h ../src/Libuv.h \
  6 + /Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
  7 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
  8 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
  9 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
  10 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
  11 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
  12 + /Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
  13 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
  14 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
  15 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
  16 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
  17 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
  18 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
  19 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
  20 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
  21 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
  22 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
  23 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
  24 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
  25 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
  26 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
  27 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
  28 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
  29 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
  30 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
  31 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
  32 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
  33 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
  34 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
  35 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
  36 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
  37 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
  38 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
  39 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
  40 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
  41 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
  42 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
  43 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
  44 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
  45 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
  46 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
  47 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
  48 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
  49 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
  50 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
  51 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h ../src/Group.h \
  52 + ../src/WebSocket.h ../src/WebSocketProtocol.h ../src/Extensions.h
  53 +../src/HTTPSocket.cpp:
  54 +../src/HTTPSocket.h:
  55 +../src/Socket.h:
  56 +../src/Networking.h:
  57 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
  58 +../src/Backend.h:
  59 +../src/Libuv.h:
  60 +/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
  61 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
  62 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
  63 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
  64 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
  65 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
  66 +/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
  67 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
  68 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
  69 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
  70 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
  71 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
  72 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
  73 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
  74 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
  75 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
  76 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
  77 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
  78 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
  79 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
  80 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
  81 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
  82 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
  83 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
  84 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
  85 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
  86 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
  87 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
  88 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
  89 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
  90 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
  91 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
  92 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
  93 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
  94 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
  95 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
  96 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
  97 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
  98 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
  99 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
  100 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
  101 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
  102 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
  103 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
  104 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
  105 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
  106 +../src/Group.h:
  107 +../src/WebSocket.h:
  108 +../src/WebSocketProtocol.h:
  109 +../src/Extensions.h:
  1 +cmd_Release/obj.target/uws/src/Hub.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/fzy/.node-gyp/8.2.1/include/node -I/Users/fzy/.node-gyp/8.2.1/src -I/Users/fzy/.node-gyp/8.2.1/deps/uv/include -I/Users/fzy/.node-gyp/8.2.1/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Hub.o.d.raw -c -o Release/obj.target/uws/src/Hub.o ../src/Hub.cpp
  2 +Release/obj.target/uws/src/Hub.o: ../src/Hub.cpp ../src/Hub.h \
  3 + ../src/Group.h ../src/WebSocket.h ../src/WebSocketProtocol.h \
  4 + ../src/Networking.h \
  5 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
  6 + ../src/Backend.h ../src/Libuv.h \
  7 + /Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
  8 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
  9 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
  10 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
  11 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
  12 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
  13 + /Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
  14 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
  15 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
  16 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
  17 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
  18 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
  19 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
  20 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
  21 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
  22 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
  23 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
  24 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
  25 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
  26 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
  27 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
  28 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
  29 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
  30 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
  31 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
  32 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
  33 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
  34 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
  35 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
  36 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
  37 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
  38 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
  39 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
  40 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
  41 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
  42 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
  43 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
  44 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
  45 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
  46 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
  47 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
  48 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
  49 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
  50 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
  51 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
  52 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h ../src/Socket.h \
  53 + ../src/HTTPSocket.h ../src/Extensions.h ../src/Node.h \
  54 + /Users/fzy/.node-gyp/8.2.1/include/node/zlib.h \
  55 + /Users/fzy/.node-gyp/8.2.1/include/node/zconf.h
  56 +../src/Hub.cpp:
  57 +../src/Hub.h:
  58 +../src/Group.h:
  59 +../src/WebSocket.h:
  60 +../src/WebSocketProtocol.h:
  61 +../src/Networking.h:
  62 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
  63 +../src/Backend.h:
  64 +../src/Libuv.h:
  65 +/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
  66 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
  67 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
  68 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
  69 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
  70 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
  71 +/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
  72 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
  73 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
  74 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
  75 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
  76 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
  77 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
  78 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
  79 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
  80 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
  81 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
  82 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
  83 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
  84 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
  85 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
  86 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
  87 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
  88 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
  89 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
  90 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
  91 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
  92 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
  93 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
  94 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
  95 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
  96 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
  97 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
  98 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
  99 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
  100 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
  101 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
  102 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
  103 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
  104 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
  105 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
  106 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
  107 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
  108 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
  109 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
  110 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
  111 +../src/Socket.h:
  112 +../src/HTTPSocket.h:
  113 +../src/Extensions.h:
  114 +../src/Node.h:
  115 +/Users/fzy/.node-gyp/8.2.1/include/node/zlib.h:
  116 +/Users/fzy/.node-gyp/8.2.1/include/node/zconf.h:
  1 +cmd_Release/obj.target/uws/src/Networking.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/fzy/.node-gyp/8.2.1/include/node -I/Users/fzy/.node-gyp/8.2.1/src -I/Users/fzy/.node-gyp/8.2.1/deps/uv/include -I/Users/fzy/.node-gyp/8.2.1/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Networking.o.d.raw -c -o Release/obj.target/uws/src/Networking.o ../src/Networking.cpp
  2 +Release/obj.target/uws/src/Networking.o: ../src/Networking.cpp \
  3 + ../src/Networking.h \
  4 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
  5 + ../src/Backend.h ../src/Libuv.h \
  6 + /Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
  7 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
  8 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
  9 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
  10 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
  11 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
  12 + /Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
  13 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
  14 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
  15 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
  16 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
  17 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
  18 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
  19 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
  20 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
  21 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
  22 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
  23 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
  24 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
  25 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
  26 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
  27 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
  28 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
  29 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
  30 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
  31 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
  32 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
  33 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
  34 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
  35 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
  36 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
  37 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
  38 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
  39 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
  40 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
  41 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
  42 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
  43 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
  44 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
  45 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
  46 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
  47 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
  48 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
  49 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
  50 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
  51 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h
  52 +../src/Networking.cpp:
  53 +../src/Networking.h:
  54 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
  55 +../src/Backend.h:
  56 +../src/Libuv.h:
  57 +/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
  58 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
  59 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
  60 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
  61 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
  62 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
  63 +/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
  64 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
  65 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
  66 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
  67 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
  68 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
  69 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
  70 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
  71 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
  72 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
  73 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
  74 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
  75 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
  76 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
  77 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
  78 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
  79 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
  80 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
  81 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
  82 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
  83 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
  84 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
  85 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
  86 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
  87 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
  88 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
  89 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
  90 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
  91 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
  92 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
  93 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
  94 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
  95 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
  96 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
  97 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
  98 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
  99 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
  100 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
  101 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
  102 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
  1 +cmd_Release/obj.target/uws/src/Node.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/fzy/.node-gyp/8.2.1/include/node -I/Users/fzy/.node-gyp/8.2.1/src -I/Users/fzy/.node-gyp/8.2.1/deps/uv/include -I/Users/fzy/.node-gyp/8.2.1/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Node.o.d.raw -c -o Release/obj.target/uws/src/Node.o ../src/Node.cpp
  2 +Release/obj.target/uws/src/Node.o: ../src/Node.cpp ../src/Node.h \
  3 + ../src/Socket.h ../src/Networking.h \
  4 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
  5 + ../src/Backend.h ../src/Libuv.h \
  6 + /Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
  7 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
  8 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
  9 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
  10 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
  11 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
  12 + /Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
  13 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
  14 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
  15 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
  16 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
  17 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
  18 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
  19 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
  20 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
  21 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
  22 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
  23 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
  24 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
  25 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
  26 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
  27 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
  28 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
  29 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
  30 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
  31 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
  32 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
  33 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
  34 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
  35 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
  36 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
  37 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
  38 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
  39 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
  40 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
  41 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
  42 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
  43 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
  44 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
  45 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
  46 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
  47 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
  48 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
  49 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
  50 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
  51 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h
  52 +../src/Node.cpp:
  53 +../src/Node.h:
  54 +../src/Socket.h:
  55 +../src/Networking.h:
  56 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
  57 +../src/Backend.h:
  58 +../src/Libuv.h:
  59 +/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
  60 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
  61 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
  62 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
  63 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
  64 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
  65 +/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
  66 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
  67 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
  68 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
  69 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
  70 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
  71 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
  72 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
  73 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
  74 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
  75 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
  76 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
  77 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
  78 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
  79 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
  80 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
  81 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
  82 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
  83 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
  84 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
  85 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
  86 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
  87 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
  88 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
  89 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
  90 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
  91 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
  92 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
  93 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
  94 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
  95 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
  96 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
  97 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
  98 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
  99 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
  100 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
  101 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
  102 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
  103 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
  104 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
  1 +cmd_Release/obj.target/uws/src/Socket.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/fzy/.node-gyp/8.2.1/include/node -I/Users/fzy/.node-gyp/8.2.1/src -I/Users/fzy/.node-gyp/8.2.1/deps/uv/include -I/Users/fzy/.node-gyp/8.2.1/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Socket.o.d.raw -c -o Release/obj.target/uws/src/Socket.o ../src/Socket.cpp
  2 +Release/obj.target/uws/src/Socket.o: ../src/Socket.cpp ../src/Socket.h \
  3 + ../src/Networking.h \
  4 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
  5 + ../src/Backend.h ../src/Libuv.h \
  6 + /Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
  7 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
  8 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
  9 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
  10 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
  11 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
  12 + /Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
  13 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
  14 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
  15 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
  16 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
  17 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
  18 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
  19 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
  20 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
  21 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
  22 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
  23 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
  24 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
  25 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
  26 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
  27 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
  28 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
  29 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
  30 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
  31 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
  32 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
  33 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
  34 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
  35 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
  36 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
  37 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
  38 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
  39 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
  40 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
  41 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
  42 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
  43 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
  44 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
  45 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
  46 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
  47 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
  48 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
  49 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
  50 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
  51 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h
  52 +../src/Socket.cpp:
  53 +../src/Socket.h:
  54 +../src/Networking.h:
  55 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
  56 +../src/Backend.h:
  57 +../src/Libuv.h:
  58 +/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
  59 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
  60 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
  61 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
  62 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
  63 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
  64 +/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
  65 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
  66 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
  67 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
  68 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
  69 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
  70 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
  71 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
  72 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
  73 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
  74 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
  75 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
  76 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
  77 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
  78 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
  79 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
  80 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
  81 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
  82 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
  83 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
  84 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
  85 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
  86 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
  87 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
  88 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
  89 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
  90 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
  91 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
  92 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
  93 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
  94 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
  95 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
  96 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
  97 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
  98 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
  99 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
  100 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
  101 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
  102 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
  103 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
  1 +cmd_Release/obj.target/uws/src/WebSocket.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/fzy/.node-gyp/8.2.1/include/node -I/Users/fzy/.node-gyp/8.2.1/src -I/Users/fzy/.node-gyp/8.2.1/deps/uv/include -I/Users/fzy/.node-gyp/8.2.1/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/WebSocket.o.d.raw -c -o Release/obj.target/uws/src/WebSocket.o ../src/WebSocket.cpp
  2 +Release/obj.target/uws/src/WebSocket.o: ../src/WebSocket.cpp \
  3 + ../src/WebSocket.h ../src/WebSocketProtocol.h ../src/Networking.h \
  4 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
  5 + ../src/Backend.h ../src/Libuv.h \
  6 + /Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
  7 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
  8 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
  9 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
  10 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
  11 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
  12 + /Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
  13 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
  14 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
  15 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
  16 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
  17 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
  18 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
  19 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
  20 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
  21 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
  22 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
  23 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
  24 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
  25 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
  26 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
  27 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
  28 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
  29 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
  30 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
  31 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
  32 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
  33 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
  34 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
  35 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
  36 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
  37 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
  38 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
  39 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
  40 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
  41 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
  42 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
  43 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
  44 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
  45 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
  46 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
  47 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
  48 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
  49 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
  50 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
  51 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h ../src/Socket.h \
  52 + ../src/Group.h ../src/HTTPSocket.h ../src/Extensions.h ../src/Hub.h \
  53 + ../src/Node.h /Users/fzy/.node-gyp/8.2.1/include/node/zlib.h \
  54 + /Users/fzy/.node-gyp/8.2.1/include/node/zconf.h
  55 +../src/WebSocket.cpp:
  56 +../src/WebSocket.h:
  57 +../src/WebSocketProtocol.h:
  58 +../src/Networking.h:
  59 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
  60 +../src/Backend.h:
  61 +../src/Libuv.h:
  62 +/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
  63 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
  64 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
  65 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
  66 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
  67 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
  68 +/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
  69 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
  70 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
  71 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
  72 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
  73 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
  74 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
  75 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
  76 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
  77 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
  78 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
  79 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
  80 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
  81 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
  82 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
  83 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
  84 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
  85 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
  86 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
  87 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
  88 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
  89 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
  90 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
  91 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
  92 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
  93 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
  94 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
  95 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
  96 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
  97 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
  98 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
  99 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
  100 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
  101 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
  102 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
  103 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
  104 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
  105 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
  106 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
  107 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
  108 +../src/Socket.h:
  109 +../src/Group.h:
  110 +../src/HTTPSocket.h:
  111 +../src/Extensions.h:
  112 +../src/Hub.h:
  113 +../src/Node.h:
  114 +/Users/fzy/.node-gyp/8.2.1/include/node/zlib.h:
  115 +/Users/fzy/.node-gyp/8.2.1/include/node/zconf.h:
  1 +cmd_Release/obj.target/uws/src/addon.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/fzy/.node-gyp/8.2.1/include/node -I/Users/fzy/.node-gyp/8.2.1/src -I/Users/fzy/.node-gyp/8.2.1/deps/uv/include -I/Users/fzy/.node-gyp/8.2.1/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/addon.o.d.raw -c -o Release/obj.target/uws/src/addon.o ../src/addon.cpp
  2 +Release/obj.target/uws/src/addon.o: ../src/addon.cpp ../src/../src/uWS.h \
  3 + ../src/Hub.h ../src/Group.h ../src/WebSocket.h \
  4 + ../src/WebSocketProtocol.h ../src/Networking.h \
  5 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
  6 + ../src/Backend.h ../src/Libuv.h \
  7 + /Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
  8 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
  9 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
  10 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
  11 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
  12 + /Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
  13 + /Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
  14 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
  15 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
  16 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
  17 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
  18 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
  19 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
  20 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
  21 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
  22 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
  23 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
  24 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
  25 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
  26 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
  27 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
  28 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
  29 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
  30 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
  31 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
  32 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
  33 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
  34 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
  35 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
  36 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
  37 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
  38 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
  39 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
  40 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
  41 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
  42 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
  43 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
  44 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
  45 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
  46 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
  47 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
  48 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
  49 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
  50 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
  51 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
  52 + /Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h ../src/Socket.h \
  53 + ../src/HTTPSocket.h ../src/Extensions.h ../src/Node.h \
  54 + /Users/fzy/.node-gyp/8.2.1/include/node/zlib.h \
  55 + /Users/fzy/.node-gyp/8.2.1/include/node/zconf.h ../src/addon.h \
  56 + /Users/fzy/.node-gyp/8.2.1/include/node/node.h \
  57 + /Users/fzy/.node-gyp/8.2.1/include/node/v8.h \
  58 + /Users/fzy/.node-gyp/8.2.1/include/node/v8-version.h \
  59 + /Users/fzy/.node-gyp/8.2.1/include/node/v8config.h \
  60 + /Users/fzy/.node-gyp/8.2.1/include/node/node_version.h \
  61 + /Users/fzy/.node-gyp/8.2.1/include/node/node_buffer.h ../src/http.h
  62 +../src/addon.cpp:
  63 +../src/../src/uWS.h:
  64 +../src/Hub.h:
  65 +../src/Group.h:
  66 +../src/WebSocket.h:
  67 +../src/WebSocketProtocol.h:
  68 +../src/Networking.h:
  69 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
  70 +../src/Backend.h:
  71 +../src/Libuv.h:
  72 +/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
  73 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
  74 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
  75 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
  76 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
  77 +/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
  78 +/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
  79 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
  80 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
  81 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
  82 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
  83 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
  84 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
  85 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
  86 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
  87 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
  88 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
  89 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
  90 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
  91 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
  92 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
  93 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
  94 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
  95 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
  96 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
  97 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
  98 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
  99 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
  100 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
  101 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
  102 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
  103 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
  104 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
  105 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
  106 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
  107 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
  108 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
  109 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
  110 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
  111 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
  112 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
  113 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
  114 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
  115 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
  116 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
  117 +/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
  118 +../src/Socket.h:
  119 +../src/HTTPSocket.h:
  120 +../src/Extensions.h:
  121 +../src/Node.h:
  122 +/Users/fzy/.node-gyp/8.2.1/include/node/zlib.h:
  123 +/Users/fzy/.node-gyp/8.2.1/include/node/zconf.h:
  124 +../src/addon.h:
  125 +/Users/fzy/.node-gyp/8.2.1/include/node/node.h:
  126 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:
  127 +/Users/fzy/.node-gyp/8.2.1/include/node/v8-version.h:
  128 +/Users/fzy/.node-gyp/8.2.1/include/node/v8config.h:
  129 +/Users/fzy/.node-gyp/8.2.1/include/node/node_version.h:
  130 +/Users/fzy/.node-gyp/8.2.1/include/node/node_buffer.h:
  131 +../src/http.h:
  1 +cmd_Release/uws.node := c++ -bundle -undefined dynamic_lookup -Wl,-no_pie -Wl,-search_paths_first -mmacosx-version-min=10.7 -arch x86_64 -L./Release -stdlib=libc++ -o Release/uws.node Release/obj.target/uws/src/Extensions.o Release/obj.target/uws/src/Group.o Release/obj.target/uws/src/Networking.o Release/obj.target/uws/src/Hub.o Release/obj.target/uws/src/Node.o Release/obj.target/uws/src/WebSocket.o Release/obj.target/uws/src/HTTPSocket.o Release/obj.target/uws/src/Socket.o Release/obj.target/uws/src/addon.o
  1 +cmd_uws := LD_LIBRARY_PATH=/Users/fzy/project/koa2_Sequelize_project/node_modules/uws/build/Release/lib.host:/Users/fzy/project/koa2_Sequelize_project/node_modules/uws/build/Release/lib.target:$$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; cp "/Users/fzy/project/koa2_Sequelize_project/node_modules/uws/build/Release/uws.node" uws_darwin_57.node
不能预览此文件类型
  1 +# This file is generated by gyp; do not edit.
  2 +
  3 +TOOLSET := target
  4 +TARGET := action_after_build
  5 +### Rules for action "move_lib":
  6 +quiet_cmd_binding_gyp_action_after_build_target_move_lib = ACTION binding_gyp_action_after_build_target_move_lib $@
  7 +cmd_binding_gyp_action_after_build_target_move_lib = LD_LIBRARY_PATH=$(builddir)/lib.host:$(builddir)/lib.target:$$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd $(srcdir)/.; cp "$(builddir)/uws.node" uws_darwin_57.node
  8 +
  9 +uws: obj := $(abs_obj)
  10 +uws: builddir := $(abs_builddir)
  11 +uws: export BUILT_FRAMEWORKS_DIR := ${abs_builddir}
  12 +uws: export BUILT_PRODUCTS_DIR := ${abs_builddir}
  13 +uws: export CONFIGURATION := ${BUILDTYPE}
  14 +uws: export PRODUCT_NAME := action_after_build
  15 +uws: export SDKROOT := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
  16 +uws: export SRCROOT := ${abs_srcdir}/
  17 +uws: export SOURCE_ROOT := ${SRCROOT}
  18 +uws: export TARGET_BUILD_DIR := ${abs_builddir}
  19 +uws: export TEMP_DIR := ${TMPDIR}
  20 +uws: TOOLSET := $(TOOLSET)
  21 +uws: $(builddir)/uws.node FORCE_DO_CMD
  22 + $(call do_cmd,binding_gyp_action_after_build_target_move_lib)
  23 +
  24 +all_deps += uws
  25 +action_binding_gyp_action_after_build_target_move_lib_outputs := uws
  26 +
  27 +
  28 +### Rules for final target.
  29 +# Build our special outputs first.
  30 +$(obj).target/action_after_build.stamp: | $(action_binding_gyp_action_after_build_target_move_lib_outputs)
  31 +
  32 +# Preserve order dependency of special output on deps.
  33 +$(action_binding_gyp_action_after_build_target_move_lib_outputs): | $(builddir)/uws.node
  34 +
  35 +$(obj).target/action_after_build.stamp: TOOLSET := $(TOOLSET)
  36 +$(obj).target/action_after_build.stamp: $(builddir)/uws.node FORCE_DO_CMD
  37 + $(call do_cmd,touch)
  38 +
  39 +all_deps += $(obj).target/action_after_build.stamp
  40 +# Add target alias
  41 +.PHONY: action_after_build
  42 +action_after_build: $(obj).target/action_after_build.stamp
  43 +
  44 +# Add target alias to "all" target.
  45 +.PHONY: all
  46 +all: action_after_build
  47 +
  1 +# This file is generated by gyp; do not edit.
  2 +
  3 +export builddir_name ?= ./build/.
  4 +.PHONY: all
  5 +all:
  6 + $(MAKE) uws action_after_build
  1 +# Do not edit. File was generated by node-gyp's "configure" step
  2 +{
  3 + "target_defaults": {
  4 + "cflags": [],
  5 + "default_configuration": "Release",
  6 + "defines": [],
  7 + "include_dirs": [],
  8 + "libraries": []
  9 + },
  10 + "variables": {
  11 + "asan": 0,
  12 + "coverage": "false",
  13 + "debug_devtools": "node",
  14 + "force_dynamic_crt": 0,
  15 + "host_arch": "x64",
  16 + "icu_data_file": "icudt59l.dat",
  17 + "icu_data_in": "../../deps/icu-small/source/data/in/icudt59l.dat",
  18 + "icu_endianness": "l",
  19 + "icu_gyp_path": "tools/icu/icu-generic.gyp",
  20 + "icu_locales": "en,root",
  21 + "icu_path": "deps/icu-small",
  22 + "icu_small": "true",
  23 + "icu_ver_major": "59",
  24 + "llvm_version": 0,
  25 + "node_byteorder": "little",
  26 + "node_enable_d8": "false",
  27 + "node_enable_v8_vtunejit": "false",
  28 + "node_install_npm": "true",
  29 + "node_module_version": 57,
  30 + "node_no_browser_globals": "false",
  31 + "node_prefix": "/",
  32 + "node_release_urlbase": "https://nodejs.org/download/release/",
  33 + "node_shared": "false",
  34 + "node_shared_cares": "false",
  35 + "node_shared_http_parser": "false",
  36 + "node_shared_libuv": "false",
  37 + "node_shared_openssl": "false",
  38 + "node_shared_zlib": "false",
  39 + "node_tag": "",
  40 + "node_use_bundled_v8": "true",
  41 + "node_use_dtrace": "true",
  42 + "node_use_etw": "false",
  43 + "node_use_lttng": "false",
  44 + "node_use_openssl": "true",
  45 + "node_use_perfctr": "false",
  46 + "node_use_v8_platform": "true",
  47 + "node_without_node_options": "false",
  48 + "openssl_fips": "",
  49 + "openssl_no_asm": 0,
  50 + "shlib_suffix": "57.dylib",
  51 + "target_arch": "x64",
  52 + "uv_parent_path": "/deps/uv/",
  53 + "uv_use_dtrace": "true",
  54 + "v8_enable_gdbjit": 0,
  55 + "v8_enable_i18n_support": 1,
  56 + "v8_enable_inspector": 1,
  57 + "v8_no_strict_aliasing": 1,
  58 + "v8_optimized_debug": 0,
  59 + "v8_promise_internal_field_count": 1,
  60 + "v8_random_seed": 0,
  61 + "v8_trace_maps": 0,
  62 + "v8_use_snapshot": "false",
  63 + "want_separate_host_toolset": 0,
  64 + "want_separate_host_toolset_mkpeephole": 0,
  65 + "xcode_version": "7.0",
  66 + "nodedir": "/Users/fzy/.node-gyp/8.2.1",
  67 + "copy_dev_lib": "true",
  68 + "standalone_static_library": 1,
  69 + "dry_run": "",
  70 + "legacy_bundling": "",
  71 + "save_dev": "",
  72 + "browser": "",
  73 + "only": "",
  74 + "viewer": "man",
  75 + "also": "",
  76 + "rollback": "true",
  77 + "usage": "",
  78 + "globalignorefile": "/usr/local/etc/npmignore",
  79 + "init_author_url": "",
  80 + "maxsockets": "50",
  81 + "shell": "/bin/zsh",
  82 + "metrics_registry": "https://registry.npmjs.org/",
  83 + "parseable": "",
  84 + "shrinkwrap": "true",
  85 + "init_license": "ISC",
  86 + "if_present": "",
  87 + "cache_max": "Infinity",
  88 + "init_author_email": "",
  89 + "sign_git_tag": "",
  90 + "cert": "",
  91 + "git_tag_version": "true",
  92 + "local_address": "",
  93 + "long": "",
  94 + "fetch_retries": "2",
  95 + "registry": "https://registry.npmjs.org/",
  96 + "key": "",
  97 + "message": "%s",
  98 + "versions": "",
  99 + "globalconfig": "/usr/local/etc/npmrc",
  100 + "always_auth": "",
  101 + "logs_max": "10",
  102 + "cache_lock_retries": "10",
  103 + "global_style": "",
  104 + "heading": "npm",
  105 + "fetch_retry_mintimeout": "10000",
  106 + "proprietary_attribs": "true",
  107 + "searchlimit": "20",
  108 + "access": "",
  109 + "json": "",
  110 + "description": "true",
  111 + "engine_strict": "",
  112 + "https_proxy": "",
  113 + "init_module": "/Users/fzy/.npm-init.js",
  114 + "userconfig": "/Users/fzy/.npmrc",
  115 + "node_version": "8.2.1",
  116 + "user": "501",
  117 + "auth_type": "legacy",
  118 + "editor": "vi",
  119 + "save": "",
  120 + "tag": "latest",
  121 + "global": "",
  122 + "progress": "true",
  123 + "ham_it_up": "",
  124 + "optional": "true",
  125 + "searchstaleness": "900",
  126 + "bin_links": "true",
  127 + "force": "",
  128 + "searchopts": "",
  129 + "depth": "Infinity",
  130 + "rebuild_bundle": "true",
  131 + "sso_poll_frequency": "500",
  132 + "unicode": "true",
  133 + "fetch_retry_maxtimeout": "60000",
  134 + "ca": "",
  135 + "save_prefix": "^",
  136 + "scripts_prepend_node_path": "warn-only",
  137 + "sso_type": "oauth",
  138 + "strict_ssl": "true",
  139 + "tag_version_prefix": "v",
  140 + "dev": "",
  141 + "fetch_retry_factor": "10",
  142 + "group": "20",
  143 + "save_exact": "",
  144 + "cache_lock_stale": "60000",
  145 + "version": "",
  146 + "cache_min": "10",
  147 + "cache": "/Users/fzy/.npm",
  148 + "searchexclude": "",
  149 + "color": "true",
  150 + "save_optional": "",
  151 + "user_agent": "npm/4.5.0 node/v8.2.1 darwin x64",
  152 + "ignore_scripts": "",
  153 + "cache_lock_wait": "10000",
  154 + "production": "",
  155 + "save_bundle": "",
  156 + "send_metrics": "",
  157 + "init_version": "1.0.0",
  158 + "umask": "0022",
  159 + "scope": "",
  160 + "git": "git",
  161 + "init_author_name": "",
  162 + "onload_script": "",
  163 + "tmp": "/var/folders/2t/7v3j57s51h3gp3q51fmz67qc0000gn/T",
  164 + "unsafe_perm": "true",
  165 + "prefix": "/usr/local",
  166 + "link": ""
  167 + }
  168 +}
  1 +#!/usr/bin/env python
  2 +# Generated by gyp. Do not edit.
  3 +# Copyright (c) 2012 Google Inc. All rights reserved.
  4 +# Use of this source code is governed by a BSD-style license that can be
  5 +# found in the LICENSE file.
  6 +
  7 +"""Utility functions to perform Xcode-style build steps.
  8 +
  9 +These functions are executed via gyp-mac-tool when using the Makefile generator.
  10 +"""
  11 +
  12 +import fcntl
  13 +import fnmatch
  14 +import glob
  15 +import json
  16 +import os
  17 +import plistlib
  18 +import re
  19 +import shutil
  20 +import string
  21 +import subprocess
  22 +import sys
  23 +import tempfile
  24 +
  25 +
  26 +def main(args):
  27 + executor = MacTool()
  28 + exit_code = executor.Dispatch(args)
  29 + if exit_code is not None:
  30 + sys.exit(exit_code)
  31 +
  32 +
  33 +class MacTool(object):
  34 + """This class performs all the Mac tooling steps. The methods can either be
  35 + executed directly, or dispatched from an argument list."""
  36 +
  37 + def Dispatch(self, args):
  38 + """Dispatches a string command to a method."""
  39 + if len(args) < 1:
  40 + raise Exception("Not enough arguments")
  41 +
  42 + method = "Exec%s" % self._CommandifyName(args[0])
  43 + return getattr(self, method)(*args[1:])
  44 +
  45 + def _CommandifyName(self, name_string):
  46 + """Transforms a tool name like copy-info-plist to CopyInfoPlist"""
  47 + return name_string.title().replace('-', '')
  48 +
  49 + def ExecCopyBundleResource(self, source, dest, convert_to_binary):
  50 + """Copies a resource file to the bundle/Resources directory, performing any
  51 + necessary compilation on each resource."""
  52 + extension = os.path.splitext(source)[1].lower()
  53 + if os.path.isdir(source):
  54 + # Copy tree.
  55 + # TODO(thakis): This copies file attributes like mtime, while the
  56 + # single-file branch below doesn't. This should probably be changed to
  57 + # be consistent with the single-file branch.
  58 + if os.path.exists(dest):
  59 + shutil.rmtree(dest)
  60 + shutil.copytree(source, dest)
  61 + elif extension == '.xib':
  62 + return self._CopyXIBFile(source, dest)
  63 + elif extension == '.storyboard':
  64 + return self._CopyXIBFile(source, dest)
  65 + elif extension == '.strings':
  66 + self._CopyStringsFile(source, dest, convert_to_binary)
  67 + else:
  68 + shutil.copy(source, dest)
  69 +
  70 + def _CopyXIBFile(self, source, dest):
  71 + """Compiles a XIB file with ibtool into a binary plist in the bundle."""
  72 +
  73 + # ibtool sometimes crashes with relative paths. See crbug.com/314728.
  74 + base = os.path.dirname(os.path.realpath(__file__))
  75 + if os.path.relpath(source):
  76 + source = os.path.join(base, source)
  77 + if os.path.relpath(dest):
  78 + dest = os.path.join(base, dest)
  79 +
  80 + args = ['xcrun', 'ibtool', '--errors', '--warnings', '--notices',
  81 + '--output-format', 'human-readable-text', '--compile', dest, source]
  82 + ibtool_section_re = re.compile(r'/\*.*\*/')
  83 + ibtool_re = re.compile(r'.*note:.*is clipping its content')
  84 + ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE)
  85 + current_section_header = None
  86 + for line in ibtoolout.stdout:
  87 + if ibtool_section_re.match(line):
  88 + current_section_header = line
  89 + elif not ibtool_re.match(line):
  90 + if current_section_header:
  91 + sys.stdout.write(current_section_header)
  92 + current_section_header = None
  93 + sys.stdout.write(line)
  94 + return ibtoolout.returncode
  95 +
  96 + def _ConvertToBinary(self, dest):
  97 + subprocess.check_call([
  98 + 'xcrun', 'plutil', '-convert', 'binary1', '-o', dest, dest])
  99 +
  100 + def _CopyStringsFile(self, source, dest, convert_to_binary):
  101 + """Copies a .strings file using iconv to reconvert the input into UTF-16."""
  102 + input_code = self._DetectInputEncoding(source) or "UTF-8"
  103 +
  104 + # Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call
  105 + # CFPropertyListCreateFromXMLData() behind the scenes; at least it prints
  106 + # CFPropertyListCreateFromXMLData(): Old-style plist parser: missing
  107 + # semicolon in dictionary.
  108 + # on invalid files. Do the same kind of validation.
  109 + import CoreFoundation
  110 + s = open(source, 'rb').read()
  111 + d = CoreFoundation.CFDataCreate(None, s, len(s))
  112 + _, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None)
  113 + if error:
  114 + return
  115 +
  116 + fp = open(dest, 'wb')
  117 + fp.write(s.decode(input_code).encode('UTF-16'))
  118 + fp.close()
  119 +
  120 + if convert_to_binary == 'True':
  121 + self._ConvertToBinary(dest)
  122 +
  123 + def _DetectInputEncoding(self, file_name):
  124 + """Reads the first few bytes from file_name and tries to guess the text
  125 + encoding. Returns None as a guess if it can't detect it."""
  126 + fp = open(file_name, 'rb')
  127 + try:
  128 + header = fp.read(3)
  129 + except e:
  130 + fp.close()
  131 + return None
  132 + fp.close()
  133 + if header.startswith("\xFE\xFF"):
  134 + return "UTF-16"
  135 + elif header.startswith("\xFF\xFE"):
  136 + return "UTF-16"
  137 + elif header.startswith("\xEF\xBB\xBF"):
  138 + return "UTF-8"
  139 + else:
  140 + return None
  141 +
  142 + def ExecCopyInfoPlist(self, source, dest, convert_to_binary, *keys):
  143 + """Copies the |source| Info.plist to the destination directory |dest|."""
  144 + # Read the source Info.plist into memory.
  145 + fd = open(source, 'r')
  146 + lines = fd.read()
  147 + fd.close()
  148 +
  149 + # Insert synthesized key/value pairs (e.g. BuildMachineOSBuild).
  150 + plist = plistlib.readPlistFromString(lines)
  151 + if keys:
  152 + plist = dict(plist.items() + json.loads(keys[0]).items())
  153 + lines = plistlib.writePlistToString(plist)
  154 +
  155 + # Go through all the environment variables and replace them as variables in
  156 + # the file.
  157 + IDENT_RE = re.compile(r'[/\s]')
  158 + for key in os.environ:
  159 + if key.startswith('_'):
  160 + continue
  161 + evar = '${%s}' % key
  162 + evalue = os.environ[key]
  163 + lines = string.replace(lines, evar, evalue)
  164 +
  165 + # Xcode supports various suffices on environment variables, which are
  166 + # all undocumented. :rfc1034identifier is used in the standard project
  167 + # template these days, and :identifier was used earlier. They are used to
  168 + # convert non-url characters into things that look like valid urls --
  169 + # except that the replacement character for :identifier, '_' isn't valid
  170 + # in a URL either -- oops, hence :rfc1034identifier was born.
  171 + evar = '${%s:identifier}' % key
  172 + evalue = IDENT_RE.sub('_', os.environ[key])
  173 + lines = string.replace(lines, evar, evalue)
  174 +
  175 + evar = '${%s:rfc1034identifier}' % key
  176 + evalue = IDENT_RE.sub('-', os.environ[key])
  177 + lines = string.replace(lines, evar, evalue)
  178 +
  179 + # Remove any keys with values that haven't been replaced.
  180 + lines = lines.split('\n')
  181 + for i in range(len(lines)):
  182 + if lines[i].strip().startswith("<string>${"):
  183 + lines[i] = None
  184 + lines[i - 1] = None
  185 + lines = '\n'.join(filter(lambda x: x is not None, lines))
  186 +
  187 + # Write out the file with variables replaced.
  188 + fd = open(dest, 'w')
  189 + fd.write(lines)
  190 + fd.close()
  191 +
  192 + # Now write out PkgInfo file now that the Info.plist file has been
  193 + # "compiled".
  194 + self._WritePkgInfo(dest)
  195 +
  196 + if convert_to_binary == 'True':
  197 + self._ConvertToBinary(dest)
  198 +
  199 + def _WritePkgInfo(self, info_plist):
  200 + """This writes the PkgInfo file from the data stored in Info.plist."""
  201 + plist = plistlib.readPlist(info_plist)
  202 + if not plist:
  203 + return
  204 +
  205 + # Only create PkgInfo for executable types.
  206 + package_type = plist['CFBundlePackageType']
  207 + if package_type != 'APPL':
  208 + return
  209 +
  210 + # The format of PkgInfo is eight characters, representing the bundle type
  211 + # and bundle signature, each four characters. If that is missing, four
  212 + # '?' characters are used instead.
  213 + signature_code = plist.get('CFBundleSignature', '????')
  214 + if len(signature_code) != 4: # Wrong length resets everything, too.
  215 + signature_code = '?' * 4
  216 +
  217 + dest = os.path.join(os.path.dirname(info_plist), 'PkgInfo')
  218 + fp = open(dest, 'w')
  219 + fp.write('%s%s' % (package_type, signature_code))
  220 + fp.close()
  221 +
  222 + def ExecFlock(self, lockfile, *cmd_list):
  223 + """Emulates the most basic behavior of Linux's flock(1)."""
  224 + # Rely on exception handling to report errors.
  225 + fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666)
  226 + fcntl.flock(fd, fcntl.LOCK_EX)
  227 + return subprocess.call(cmd_list)
  228 +
  229 + def ExecFilterLibtool(self, *cmd_list):
  230 + """Calls libtool and filters out '/path/to/libtool: file: foo.o has no
  231 + symbols'."""
  232 + libtool_re = re.compile(r'^.*libtool: file: .* has no symbols$')
  233 + libtool_re5 = re.compile(
  234 + r'^.*libtool: warning for library: ' +
  235 + r'.* the table of contents is empty ' +
  236 + r'\(no object file members in the library define global symbols\)$')
  237 + env = os.environ.copy()
  238 + # Ref:
  239 + # http://www.opensource.apple.com/source/cctools/cctools-809/misc/libtool.c
  240 + # The problem with this flag is that it resets the file mtime on the file to
  241 + # epoch=0, e.g. 1970-1-1 or 1969-12-31 depending on timezone.
  242 + env['ZERO_AR_DATE'] = '1'
  243 + libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE, env=env)
  244 + _, err = libtoolout.communicate()
  245 + for line in err.splitlines():
  246 + if not libtool_re.match(line) and not libtool_re5.match(line):
  247 + print >>sys.stderr, line
  248 + # Unconditionally touch the output .a file on the command line if present
  249 + # and the command succeeded. A bit hacky.
  250 + if not libtoolout.returncode:
  251 + for i in range(len(cmd_list) - 1):
  252 + if cmd_list[i] == "-o" and cmd_list[i+1].endswith('.a'):
  253 + os.utime(cmd_list[i+1], None)
  254 + break
  255 + return libtoolout.returncode
  256 +
  257 + def ExecPackageFramework(self, framework, version):
  258 + """Takes a path to Something.framework and the Current version of that and
  259 + sets up all the symlinks."""
  260 + # Find the name of the binary based on the part before the ".framework".
  261 + binary = os.path.basename(framework).split('.')[0]
  262 +
  263 + CURRENT = 'Current'
  264 + RESOURCES = 'Resources'
  265 + VERSIONS = 'Versions'
  266 +
  267 + if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)):
  268 + # Binary-less frameworks don't seem to contain symlinks (see e.g.
  269 + # chromium's out/Debug/org.chromium.Chromium.manifest/ bundle).
  270 + return
  271 +
  272 + # Move into the framework directory to set the symlinks correctly.
  273 + pwd = os.getcwd()
  274 + os.chdir(framework)
  275 +
  276 + # Set up the Current version.
  277 + self._Relink(version, os.path.join(VERSIONS, CURRENT))
  278 +
  279 + # Set up the root symlinks.
  280 + self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary)
  281 + self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES)
  282 +
  283 + # Back to where we were before!
  284 + os.chdir(pwd)
  285 +
  286 + def _Relink(self, dest, link):
  287 + """Creates a symlink to |dest| named |link|. If |link| already exists,
  288 + it is overwritten."""
  289 + if os.path.lexists(link):
  290 + os.remove(link)
  291 + os.symlink(dest, link)
  292 +
  293 + def ExecCompileXcassets(self, keys, *inputs):
  294 + """Compiles multiple .xcassets files into a single .car file.
  295 +
  296 + This invokes 'actool' to compile all the inputs .xcassets files. The
  297 + |keys| arguments is a json-encoded dictionary of extra arguments to
  298 + pass to 'actool' when the asset catalogs contains an application icon
  299 + or a launch image.
  300 +
  301 + Note that 'actool' does not create the Assets.car file if the asset
  302 + catalogs does not contains imageset.
  303 + """
  304 + command_line = [
  305 + 'xcrun', 'actool', '--output-format', 'human-readable-text',
  306 + '--compress-pngs', '--notices', '--warnings', '--errors',
  307 + ]
  308 + is_iphone_target = 'IPHONEOS_DEPLOYMENT_TARGET' in os.environ
  309 + if is_iphone_target:
  310 + platform = os.environ['CONFIGURATION'].split('-')[-1]
  311 + if platform not in ('iphoneos', 'iphonesimulator'):
  312 + platform = 'iphonesimulator'
  313 + command_line.extend([
  314 + '--platform', platform, '--target-device', 'iphone',
  315 + '--target-device', 'ipad', '--minimum-deployment-target',
  316 + os.environ['IPHONEOS_DEPLOYMENT_TARGET'], '--compile',
  317 + os.path.abspath(os.environ['CONTENTS_FOLDER_PATH']),
  318 + ])
  319 + else:
  320 + command_line.extend([
  321 + '--platform', 'macosx', '--target-device', 'mac',
  322 + '--minimum-deployment-target', os.environ['MACOSX_DEPLOYMENT_TARGET'],
  323 + '--compile',
  324 + os.path.abspath(os.environ['UNLOCALIZED_RESOURCES_FOLDER_PATH']),
  325 + ])
  326 + if keys:
  327 + keys = json.loads(keys)
  328 + for key, value in keys.iteritems():
  329 + arg_name = '--' + key
  330 + if isinstance(value, bool):
  331 + if value:
  332 + command_line.append(arg_name)
  333 + elif isinstance(value, list):
  334 + for v in value:
  335 + command_line.append(arg_name)
  336 + command_line.append(str(v))
  337 + else:
  338 + command_line.append(arg_name)
  339 + command_line.append(str(value))
  340 + # Note: actool crashes if inputs path are relative, so use os.path.abspath
  341 + # to get absolute path name for inputs.
  342 + command_line.extend(map(os.path.abspath, inputs))
  343 + subprocess.check_call(command_line)
  344 +
  345 + def ExecMergeInfoPlist(self, output, *inputs):
  346 + """Merge multiple .plist files into a single .plist file."""
  347 + merged_plist = {}
  348 + for path in inputs:
  349 + plist = self._LoadPlistMaybeBinary(path)
  350 + self._MergePlist(merged_plist, plist)
  351 + plistlib.writePlist(merged_plist, output)
  352 +
  353 + def ExecCodeSignBundle(self, key, resource_rules, entitlements, provisioning):
  354 + """Code sign a bundle.
  355 +
  356 + This function tries to code sign an iOS bundle, following the same
  357 + algorithm as Xcode:
  358 + 1. copy ResourceRules.plist from the user or the SDK into the bundle,
  359 + 2. pick the provisioning profile that best match the bundle identifier,
  360 + and copy it into the bundle as embedded.mobileprovision,
  361 + 3. copy Entitlements.plist from user or SDK next to the bundle,
  362 + 4. code sign the bundle.
  363 + """
  364 + resource_rules_path = self._InstallResourceRules(resource_rules)
  365 + substitutions, overrides = self._InstallProvisioningProfile(
  366 + provisioning, self._GetCFBundleIdentifier())
  367 + entitlements_path = self._InstallEntitlements(
  368 + entitlements, substitutions, overrides)
  369 + subprocess.check_call([
  370 + 'codesign', '--force', '--sign', key, '--resource-rules',
  371 + resource_rules_path, '--entitlements', entitlements_path,
  372 + os.path.join(
  373 + os.environ['TARGET_BUILD_DIR'],
  374 + os.environ['FULL_PRODUCT_NAME'])])
  375 +
  376 + def _InstallResourceRules(self, resource_rules):
  377 + """Installs ResourceRules.plist from user or SDK into the bundle.
  378 +
  379 + Args:
  380 + resource_rules: string, optional, path to the ResourceRules.plist file
  381 + to use, default to "${SDKROOT}/ResourceRules.plist"
  382 +
  383 + Returns:
  384 + Path to the copy of ResourceRules.plist into the bundle.
  385 + """
  386 + source_path = resource_rules
  387 + target_path = os.path.join(
  388 + os.environ['BUILT_PRODUCTS_DIR'],
  389 + os.environ['CONTENTS_FOLDER_PATH'],
  390 + 'ResourceRules.plist')
  391 + if not source_path:
  392 + source_path = os.path.join(
  393 + os.environ['SDKROOT'], 'ResourceRules.plist')
  394 + shutil.copy2(source_path, target_path)
  395 + return target_path
  396 +
  397 + def _InstallProvisioningProfile(self, profile, bundle_identifier):
  398 + """Installs embedded.mobileprovision into the bundle.
  399 +
  400 + Args:
  401 + profile: string, optional, short name of the .mobileprovision file
  402 + to use, if empty or the file is missing, the best file installed
  403 + will be used
  404 + bundle_identifier: string, value of CFBundleIdentifier from Info.plist
  405 +
  406 + Returns:
  407 + A tuple containing two dictionary: variables substitutions and values
  408 + to overrides when generating the entitlements file.
  409 + """
  410 + source_path, provisioning_data, team_id = self._FindProvisioningProfile(
  411 + profile, bundle_identifier)
  412 + target_path = os.path.join(
  413 + os.environ['BUILT_PRODUCTS_DIR'],
  414 + os.environ['CONTENTS_FOLDER_PATH'],
  415 + 'embedded.mobileprovision')
  416 + shutil.copy2(source_path, target_path)
  417 + substitutions = self._GetSubstitutions(bundle_identifier, team_id + '.')
  418 + return substitutions, provisioning_data['Entitlements']
  419 +
  420 + def _FindProvisioningProfile(self, profile, bundle_identifier):
  421 + """Finds the .mobileprovision file to use for signing the bundle.
  422 +
  423 + Checks all the installed provisioning profiles (or if the user specified
  424 + the PROVISIONING_PROFILE variable, only consult it) and select the most
  425 + specific that correspond to the bundle identifier.
  426 +
  427 + Args:
  428 + profile: string, optional, short name of the .mobileprovision file
  429 + to use, if empty or the file is missing, the best file installed
  430 + will be used
  431 + bundle_identifier: string, value of CFBundleIdentifier from Info.plist
  432 +
  433 + Returns:
  434 + A tuple of the path to the selected provisioning profile, the data of
  435 + the embedded plist in the provisioning profile and the team identifier
  436 + to use for code signing.
  437 +
  438 + Raises:
  439 + SystemExit: if no .mobileprovision can be used to sign the bundle.
  440 + """
  441 + profiles_dir = os.path.join(
  442 + os.environ['HOME'], 'Library', 'MobileDevice', 'Provisioning Profiles')
  443 + if not os.path.isdir(profiles_dir):
  444 + print >>sys.stderr, (
  445 + 'cannot find mobile provisioning for %s' % bundle_identifier)
  446 + sys.exit(1)
  447 + provisioning_profiles = None
  448 + if profile:
  449 + profile_path = os.path.join(profiles_dir, profile + '.mobileprovision')
  450 + if os.path.exists(profile_path):
  451 + provisioning_profiles = [profile_path]
  452 + if not provisioning_profiles:
  453 + provisioning_profiles = glob.glob(
  454 + os.path.join(profiles_dir, '*.mobileprovision'))
  455 + valid_provisioning_profiles = {}
  456 + for profile_path in provisioning_profiles:
  457 + profile_data = self._LoadProvisioningProfile(profile_path)
  458 + app_id_pattern = profile_data.get(
  459 + 'Entitlements', {}).get('application-identifier', '')
  460 + for team_identifier in profile_data.get('TeamIdentifier', []):
  461 + app_id = '%s.%s' % (team_identifier, bundle_identifier)
  462 + if fnmatch.fnmatch(app_id, app_id_pattern):
  463 + valid_provisioning_profiles[app_id_pattern] = (
  464 + profile_path, profile_data, team_identifier)
  465 + if not valid_provisioning_profiles:
  466 + print >>sys.stderr, (
  467 + 'cannot find mobile provisioning for %s' % bundle_identifier)
  468 + sys.exit(1)
  469 + # If the user has multiple provisioning profiles installed that can be
  470 + # used for ${bundle_identifier}, pick the most specific one (ie. the
  471 + # provisioning profile whose pattern is the longest).
  472 + selected_key = max(valid_provisioning_profiles, key=lambda v: len(v))
  473 + return valid_provisioning_profiles[selected_key]
  474 +
  475 + def _LoadProvisioningProfile(self, profile_path):
  476 + """Extracts the plist embedded in a provisioning profile.
  477 +
  478 + Args:
  479 + profile_path: string, path to the .mobileprovision file
  480 +
  481 + Returns:
  482 + Content of the plist embedded in the provisioning profile as a dictionary.
  483 + """
  484 + with tempfile.NamedTemporaryFile() as temp:
  485 + subprocess.check_call([
  486 + 'security', 'cms', '-D', '-i', profile_path, '-o', temp.name])
  487 + return self._LoadPlistMaybeBinary(temp.name)
  488 +
  489 + def _MergePlist(self, merged_plist, plist):
  490 + """Merge |plist| into |merged_plist|."""
  491 + for key, value in plist.iteritems():
  492 + if isinstance(value, dict):
  493 + merged_value = merged_plist.get(key, {})
  494 + if isinstance(merged_value, dict):
  495 + self._MergePlist(merged_value, value)
  496 + merged_plist[key] = merged_value
  497 + else:
  498 + merged_plist[key] = value
  499 + else:
  500 + merged_plist[key] = value
  501 +
  502 + def _LoadPlistMaybeBinary(self, plist_path):
  503 + """Loads into a memory a plist possibly encoded in binary format.
  504 +
  505 + This is a wrapper around plistlib.readPlist that tries to convert the
  506 + plist to the XML format if it can't be parsed (assuming that it is in
  507 + the binary format).
  508 +
  509 + Args:
  510 + plist_path: string, path to a plist file, in XML or binary format
  511 +
  512 + Returns:
  513 + Content of the plist as a dictionary.
  514 + """
  515 + try:
  516 + # First, try to read the file using plistlib that only supports XML,
  517 + # and if an exception is raised, convert a temporary copy to XML and
  518 + # load that copy.
  519 + return plistlib.readPlist(plist_path)
  520 + except:
  521 + pass
  522 + with tempfile.NamedTemporaryFile() as temp:
  523 + shutil.copy2(plist_path, temp.name)
  524 + subprocess.check_call(['plutil', '-convert', 'xml1', temp.name])
  525 + return plistlib.readPlist(temp.name)
  526 +
  527 + def _GetSubstitutions(self, bundle_identifier, app_identifier_prefix):
  528 + """Constructs a dictionary of variable substitutions for Entitlements.plist.
  529 +
  530 + Args:
  531 + bundle_identifier: string, value of CFBundleIdentifier from Info.plist
  532 + app_identifier_prefix: string, value for AppIdentifierPrefix
  533 +
  534 + Returns:
  535 + Dictionary of substitutions to apply when generating Entitlements.plist.
  536 + """
  537 + return {
  538 + 'CFBundleIdentifier': bundle_identifier,
  539 + 'AppIdentifierPrefix': app_identifier_prefix,
  540 + }
  541 +
  542 + def _GetCFBundleIdentifier(self):
  543 + """Extracts CFBundleIdentifier value from Info.plist in the bundle.
  544 +
  545 + Returns:
  546 + Value of CFBundleIdentifier in the Info.plist located in the bundle.
  547 + """
  548 + info_plist_path = os.path.join(
  549 + os.environ['TARGET_BUILD_DIR'],
  550 + os.environ['INFOPLIST_PATH'])
  551 + info_plist_data = self._LoadPlistMaybeBinary(info_plist_path)
  552 + return info_plist_data['CFBundleIdentifier']
  553 +
  554 + def _InstallEntitlements(self, entitlements, substitutions, overrides):
  555 + """Generates and install the ${BundleName}.xcent entitlements file.
  556 +
  557 + Expands variables "$(variable)" pattern in the source entitlements file,
  558 + add extra entitlements defined in the .mobileprovision file and the copy
  559 + the generated plist to "${BundlePath}.xcent".
  560 +
  561 + Args:
  562 + entitlements: string, optional, path to the Entitlements.plist template
  563 + to use, defaults to "${SDKROOT}/Entitlements.plist"
  564 + substitutions: dictionary, variable substitutions
  565 + overrides: dictionary, values to add to the entitlements
  566 +
  567 + Returns:
  568 + Path to the generated entitlements file.
  569 + """
  570 + source_path = entitlements
  571 + target_path = os.path.join(
  572 + os.environ['BUILT_PRODUCTS_DIR'],
  573 + os.environ['PRODUCT_NAME'] + '.xcent')
  574 + if not source_path:
  575 + source_path = os.path.join(
  576 + os.environ['SDKROOT'],
  577 + 'Entitlements.plist')
  578 + shutil.copy2(source_path, target_path)
  579 + data = self._LoadPlistMaybeBinary(target_path)
  580 + data = self._ExpandVariables(data, substitutions)
  581 + if overrides:
  582 + for key in overrides:
  583 + if key not in data:
  584 + data[key] = overrides[key]
  585 + plistlib.writePlist(data, target_path)
  586 + return target_path
  587 +
  588 + def _ExpandVariables(self, data, substitutions):
  589 + """Expands variables "$(variable)" in data.
  590 +
  591 + Args:
  592 + data: object, can be either string, list or dictionary
  593 + substitutions: dictionary, variable substitutions to perform
  594 +
  595 + Returns:
  596 + Copy of data where each references to "$(variable)" has been replaced
  597 + by the corresponding value found in substitutions, or left intact if
  598 + the key was not found.
  599 + """
  600 + if isinstance(data, str):
  601 + for key, value in substitutions.iteritems():
  602 + data = data.replace('$(%s)' % key, value)
  603 + return data
  604 + if isinstance(data, list):
  605 + return [self._ExpandVariables(v, substitutions) for v in data]
  606 + if isinstance(data, dict):
  607 + return {k: self._ExpandVariables(data[k], substitutions) for k in data}
  608 + return data
  609 +
  610 +if __name__ == '__main__':
  611 + sys.exit(main(sys.argv[1:]))
  1 +# This file is generated by gyp; do not edit.
  2 +
  3 +TOOLSET := target
  4 +TARGET := uws
  5 +DEFS_Debug := \
  6 + '-DNODE_GYP_MODULE_NAME=uws' \
  7 + '-DUSING_UV_SHARED=1' \
  8 + '-DUSING_V8_SHARED=1' \
  9 + '-DV8_DEPRECATION_WARNINGS=1' \
  10 + '-D_DARWIN_USE_64_BIT_INODE=1' \
  11 + '-D_LARGEFILE_SOURCE' \
  12 + '-D_FILE_OFFSET_BITS=64' \
  13 + '-DBUILDING_NODE_EXTENSION' \
  14 + '-DDEBUG' \
  15 + '-D_DEBUG' \
  16 + '-DV8_ENABLE_CHECKS'
  17 +
  18 +# Flags passed to all source files.
  19 +CFLAGS_Debug := \
  20 + -O0 \
  21 + -mmacosx-version-min=10.7 \
  22 + -arch x86_64 \
  23 + -Wall \
  24 + -Wendif-labels \
  25 + -W \
  26 + -Wno-unused-parameter
  27 +
  28 +# Flags passed to only C files.
  29 +CFLAGS_C_Debug :=
  30 +
  31 +# Flags passed to only C++ files.
  32 +CFLAGS_CC_Debug := \
  33 + -std=c++11 \
  34 + -stdlib=libc++ \
  35 + -DUSE_LIBUV
  36 +
  37 +# Flags passed to only ObjC files.
  38 +CFLAGS_OBJC_Debug :=
  39 +
  40 +# Flags passed to only ObjC++ files.
  41 +CFLAGS_OBJCC_Debug :=
  42 +
  43 +INCS_Debug := \
  44 + -I/Users/fzy/.node-gyp/8.2.1/include/node \
  45 + -I/Users/fzy/.node-gyp/8.2.1/src \
  46 + -I/Users/fzy/.node-gyp/8.2.1/deps/uv/include \
  47 + -I/Users/fzy/.node-gyp/8.2.1/deps/v8/include
  48 +
  49 +DEFS_Release := \
  50 + '-DNODE_GYP_MODULE_NAME=uws' \
  51 + '-DUSING_UV_SHARED=1' \
  52 + '-DUSING_V8_SHARED=1' \
  53 + '-DV8_DEPRECATION_WARNINGS=1' \
  54 + '-D_DARWIN_USE_64_BIT_INODE=1' \
  55 + '-D_LARGEFILE_SOURCE' \
  56 + '-D_FILE_OFFSET_BITS=64' \
  57 + '-DBUILDING_NODE_EXTENSION'
  58 +
  59 +# Flags passed to all source files.
  60 +CFLAGS_Release := \
  61 + -O3 \
  62 + -mmacosx-version-min=10.7 \
  63 + -arch x86_64 \
  64 + -Wall \
  65 + -Wendif-labels \
  66 + -W \
  67 + -Wno-unused-parameter
  68 +
  69 +# Flags passed to only C files.
  70 +CFLAGS_C_Release :=
  71 +
  72 +# Flags passed to only C++ files.
  73 +CFLAGS_CC_Release := \
  74 + -std=c++11 \
  75 + -stdlib=libc++ \
  76 + -DUSE_LIBUV
  77 +
  78 +# Flags passed to only ObjC files.
  79 +CFLAGS_OBJC_Release :=
  80 +
  81 +# Flags passed to only ObjC++ files.
  82 +CFLAGS_OBJCC_Release :=
  83 +
  84 +INCS_Release := \
  85 + -I/Users/fzy/.node-gyp/8.2.1/include/node \
  86 + -I/Users/fzy/.node-gyp/8.2.1/src \
  87 + -I/Users/fzy/.node-gyp/8.2.1/deps/uv/include \
  88 + -I/Users/fzy/.node-gyp/8.2.1/deps/v8/include
  89 +
  90 +OBJS := \
  91 + $(obj).target/$(TARGET)/src/Extensions.o \
  92 + $(obj).target/$(TARGET)/src/Group.o \
  93 + $(obj).target/$(TARGET)/src/Networking.o \
  94 + $(obj).target/$(TARGET)/src/Hub.o \
  95 + $(obj).target/$(TARGET)/src/Node.o \
  96 + $(obj).target/$(TARGET)/src/WebSocket.o \
  97 + $(obj).target/$(TARGET)/src/HTTPSocket.o \
  98 + $(obj).target/$(TARGET)/src/Socket.o \
  99 + $(obj).target/$(TARGET)/src/addon.o
  100 +
  101 +# Add to the list of files we specially track dependencies for.
  102 +all_deps += $(OBJS)
  103 +
  104 +# CFLAGS et al overrides must be target-local.
  105 +# See "Target-specific Variable Values" in the GNU Make manual.
  106 +$(OBJS): TOOLSET := $(TOOLSET)
  107 +$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
  108 +$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
  109 +$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))
  110 +$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))
  111 +
  112 +# Suffix rules, putting all outputs into $(obj).
  113 +
  114 +$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
  115 + @$(call do_cmd,cxx,1)
  116 +
  117 +# Try building from generated source, too.
  118 +
  119 +$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
  120 + @$(call do_cmd,cxx,1)
  121 +
  122 +$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
  123 + @$(call do_cmd,cxx,1)
  124 +
  125 +# End of this set of suffix rules
  126 +### Rules for final target.
  127 +LDFLAGS_Debug := \
  128 + -undefined dynamic_lookup \
  129 + -Wl,-no_pie \
  130 + -Wl,-search_paths_first \
  131 + -mmacosx-version-min=10.7 \
  132 + -arch x86_64 \
  133 + -L$(builddir) \
  134 + -stdlib=libc++
  135 +
  136 +LIBTOOLFLAGS_Debug := \
  137 + -undefined dynamic_lookup \
  138 + -Wl,-no_pie \
  139 + -Wl,-search_paths_first
  140 +
  141 +LDFLAGS_Release := \
  142 + -undefined dynamic_lookup \
  143 + -Wl,-no_pie \
  144 + -Wl,-search_paths_first \
  145 + -mmacosx-version-min=10.7 \
  146 + -arch x86_64 \
  147 + -L$(builddir) \
  148 + -stdlib=libc++
  149 +
  150 +LIBTOOLFLAGS_Release := \
  151 + -undefined dynamic_lookup \
  152 + -Wl,-no_pie \
  153 + -Wl,-search_paths_first
  154 +
  155 +LIBS :=
  156 +
  157 +$(builddir)/uws.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
  158 +$(builddir)/uws.node: LIBS := $(LIBS)
  159 +$(builddir)/uws.node: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE))
  160 +$(builddir)/uws.node: TOOLSET := $(TOOLSET)
  161 +$(builddir)/uws.node: $(OBJS) FORCE_DO_CMD
  162 + $(call do_cmd,solink_module)
  163 +
  164 +all_deps += $(builddir)/uws.node
  165 +# Add target alias
  166 +.PHONY: uws
  167 +uws: $(builddir)/uws.node
  168 +
  169 +# Short alias for building this executable.
  170 +.PHONY: uws.node
  171 +uws.node: $(builddir)/uws.node
  172 +
  173 +# Add executable to "all" target.
  174 +.PHONY: all
  175 +all: $(builddir)/uws.node
  176 +
  1 + CXX(target) Release/obj.target/uws/src/Extensions.o
  2 +./Release/.deps/Release/obj.target/uws/src/Extensions.o.d.raw Stats {
  3 + dev: 16777220,
  4 + mode: 33188,
  5 + nlink: 1,
  6 + uid: 501,
  7 + gid: 20,
  8 + rdev: 0,
  9 + blksize: 4096,
  10 + ino: 27524149,
  11 + size: 87,
  12 + blocks: 8,
  13 + atimeMs: 1503372419000,
  14 + mtimeMs: 1503372419000,
  15 + ctimeMs: 1503372419000,
  16 + birthtimeMs: 1503372418000,
  17 + atime: 2017-08-22T03:26:59.000Z,
  18 + mtime: 2017-08-22T03:26:59.000Z,
  19 + ctime: 2017-08-22T03:26:59.000Z,
  20 + birthtime: 2017-08-22T03:26:58.000Z }
  21 + CXX(target) Release/obj.target/uws/src/Group.o
  22 +./Release/.deps/Release/obj.target/uws/src/Group.o.d.raw Stats {
  23 + dev: 16777220,
  24 + mode: 33188,
  25 + nlink: 1,
  26 + uid: 501,
  27 + gid: 20,
  28 + rdev: 0,
  29 + blksize: 4096,
  30 + ino: 27524158,
  31 + size: 3185,
  32 + blocks: 8,
  33 + atimeMs: 1503372423000,
  34 + mtimeMs: 1503372423000,
  35 + ctimeMs: 1503372423000,
  36 + birthtimeMs: 1503372423000,
  37 + atime: 2017-08-22T03:27:03.000Z,
  38 + mtime: 2017-08-22T03:27:03.000Z,
  39 + ctime: 2017-08-22T03:27:03.000Z,
  40 + birthtime: 2017-08-22T03:27:03.000Z }
  41 + CXX(target) Release/obj.target/uws/src/Networking.o
  42 +./Release/.deps/Release/obj.target/uws/src/Networking.o.d.raw Stats {
  43 + dev: 16777220,
  44 + mode: 33188,
  45 + nlink: 1,
  46 + uid: 501,
  47 + gid: 20,
  48 + rdev: 0,
  49 + blksize: 4096,
  50 + ino: 27524161,
  51 + size: 2944,
  52 + blocks: 8,
  53 + atimeMs: 1503372424000,
  54 + mtimeMs: 1503372424000,
  55 + ctimeMs: 1503372424000,
  56 + birthtimeMs: 1503372424000,
  57 + atime: 2017-08-22T03:27:04.000Z,
  58 + mtime: 2017-08-22T03:27:04.000Z,
  59 + ctime: 2017-08-22T03:27:04.000Z,
  60 + birthtime: 2017-08-22T03:27:04.000Z }
  61 + CXX(target) Release/obj.target/uws/src/Hub.o
  62 +./Release/.deps/Release/obj.target/uws/src/Hub.o.d.raw Stats {
  63 + dev: 16777220,
  64 + mode: 33188,
  65 + nlink: 1,
  66 + uid: 501,
  67 + gid: 20,
  68 + rdev: 0,
  69 + blksize: 4096,
  70 + ino: 27524164,
  71 + size: 3185,
  72 + blocks: 8,
  73 + atimeMs: 1503372425000,
  74 + mtimeMs: 1503372425000,
  75 + ctimeMs: 1503372425000,
  76 + birthtimeMs: 1503372425000,
  77 + atime: 2017-08-22T03:27:05.000Z,
  78 + mtime: 2017-08-22T03:27:05.000Z,
  79 + ctime: 2017-08-22T03:27:05.000Z,
  80 + birthtime: 2017-08-22T03:27:05.000Z }
  81 + CXX(target) Release/obj.target/uws/src/Node.o
  82 +./Release/.deps/Release/obj.target/uws/src/Node.o.d.raw Stats {
  83 + dev: 16777220,
  84 + mode: 33188,
  85 + nlink: 1,
  86 + uid: 501,
  87 + gid: 20,
  88 + rdev: 0,
  89 + blksize: 4096,
  90 + ino: 27524168,
  91 + size: 2962,
  92 + blocks: 8,
  93 + atimeMs: 1503372426000,
  94 + mtimeMs: 1503372426000,
  95 + ctimeMs: 1503372426000,
  96 + birthtimeMs: 1503372426000,
  97 + atime: 2017-08-22T03:27:06.000Z,
  98 + mtime: 2017-08-22T03:27:06.000Z,
  99 + ctime: 2017-08-22T03:27:06.000Z,
  100 + birthtime: 2017-08-22T03:27:06.000Z }
  101 + CXX(target) Release/obj.target/uws/src/WebSocket.o
  102 +./Release/.deps/Release/obj.target/uws/src/WebSocket.o.d.raw Stats {
  103 + dev: 16777220,
  104 + mode: 33188,
  105 + nlink: 1,
  106 + uid: 501,
  107 + gid: 20,
  108 + rdev: 0,
  109 + blksize: 4096,
  110 + ino: 27524182,
  111 + size: 3193,
  112 + blocks: 8,
  113 + atimeMs: 1503372428000,
  114 + mtimeMs: 1503372428000,
  115 + ctimeMs: 1503372428000,
  116 + birthtimeMs: 1503372427000,
  117 + atime: 2017-08-22T03:27:08.000Z,
  118 + mtime: 2017-08-22T03:27:08.000Z,
  119 + ctime: 2017-08-22T03:27:08.000Z,
  120 + birthtime: 2017-08-22T03:27:07.000Z }
  121 + CXX(target) Release/obj.target/uws/src/HTTPSocket.o
  122 +./Release/.deps/Release/obj.target/uws/src/HTTPSocket.o.d.raw Stats {
  123 + dev: 16777220,
  124 + mode: 33188,
  125 + nlink: 1,
  126 + uid: 501,
  127 + gid: 20,
  128 + rdev: 0,
  129 + blksize: 4096,
  130 + ino: 27524200,
  131 + size: 3065,
  132 + blocks: 8,
  133 + atimeMs: 1503372429000,
  134 + mtimeMs: 1503372429000,
  135 + ctimeMs: 1503372429000,
  136 + birthtimeMs: 1503372429000,
  137 + atime: 2017-08-22T03:27:09.000Z,
  138 + mtime: 2017-08-22T03:27:09.000Z,
  139 + ctime: 2017-08-22T03:27:09.000Z,
  140 + birthtime: 2017-08-22T03:27:09.000Z }
  141 + CXX(target) Release/obj.target/uws/src/Socket.o
  142 +./Release/.deps/Release/obj.target/uws/src/Socket.o.d.raw Stats {
  143 + dev: 16777220,
  144 + mode: 33188,
  145 + nlink: 1,
  146 + uid: 501,
  147 + gid: 20,
  148 + rdev: 0,
  149 + blksize: 4096,
  150 + ino: 27524203,
  151 + size: 2952,
  152 + blocks: 8,
  153 + atimeMs: 1503372430000,
  154 + mtimeMs: 1503372430000,
  155 + ctimeMs: 1503372430000,
  156 + birthtimeMs: 1503372430000,
  157 + atime: 2017-08-22T03:27:10.000Z,
  158 + mtime: 2017-08-22T03:27:10.000Z,
  159 + ctime: 2017-08-22T03:27:10.000Z,
  160 + birthtime: 2017-08-22T03:27:10.000Z }
  161 + CXX(target) Release/obj.target/uws/src/addon.o
  162 +In file included from ../src/addon.cpp:3:
  163 +../src/http.h:31:55: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
  164 + args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) header.value, String::kNormalString, header.valueLength));
  165 + ^
  166 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
  167 + Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
  168 + ^
  169 +In file included from ../src/addon.cpp:3:
  170 +../src/http.h:45:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
  171 + args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "GET", String::kNormalString, 3));
  172 + ^
  173 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
  174 + Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
  175 + ^
  176 +In file included from ../src/addon.cpp:3:
  177 +../src/http.h:48:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
  178 + args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "PUT", String::kNormalString, 3));
  179 + ^
  180 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
  181 + Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
  182 + ^
  183 +In file included from ../src/addon.cpp:3:
  184 +../src/http.h:51:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
  185 + args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "POST", String::kNormalString, 4));
  186 + ^
  187 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
  188 + Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
  189 + ^
  190 +In file included from ../src/addon.cpp:3:
  191 +../src/http.h:54:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
  192 + args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "HEAD", String::kNormalString, 4));
  193 + ^
  194 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
  195 + Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
  196 + ^
  197 +In file included from ../src/addon.cpp:3:
  198 +../src/http.h:57:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
  199 + args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "PATCH", String::kNormalString, 5));
  200 + ^
  201 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
  202 + Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
  203 + ^
  204 +In file included from ../src/addon.cpp:3:
  205 +../src/http.h:60:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
  206 + args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "TRACE", String::kNormalString, 5));
  207 + ^
  208 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
  209 + Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
  210 + ^
  211 +In file included from ../src/addon.cpp:3:
  212 +../src/http.h:63:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
  213 + args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "DELETE", String::kNormalString, 6));
  214 + ^
  215 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
  216 + Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
  217 + ^
  218 +In file included from ../src/addon.cpp:3:
  219 +../src/http.h:66:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
  220 + args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "OPTIONS", String::kNormalString, 7));
  221 + ^
  222 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
  223 + Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
  224 + ^
  225 +In file included from ../src/addon.cpp:3:
  226 +../src/http.h:69:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
  227 + args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "CONNECT", String::kNormalString, 7));
  228 + ^
  229 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
  230 + Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
  231 + ^
  232 +In file included from ../src/addon.cpp:3:
  233 +../src/http.h:99:77: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  234 + Local<Object> reqObjectLocal = reqTemplateLocal->GetFunction()->NewInstance();
  235 + ^
  236 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:3674:52: note: 'NewInstance' has been explicitly marked deprecated here
  237 + V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  238 + ^
  239 +In file included from ../src/addon.cpp:3:
  240 +../src/http.h:149:39: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
  241 + for (int i = 0; i < headers->Length(); i++) {
  242 + ~ ^ ~~~~~~~~~~~~~~~~~
  243 +../src/http.h:196:53: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  244 + return resTemplateLocal->GetFunction()->NewInstance();
  245 + ^
  246 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:3674:52: note: 'NewInstance' has been explicitly marked deprecated here
  247 + V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  248 + ^
  249 +In file included from ../src/addon.cpp:3:
  250 +../src/http.h:227:52: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
  251 + reqObject->SetInternalField(4, String::NewFromOneByte(isolate, (uint8_t *) req.getUrl().value, String::kNormalString, req.getUrl().valueLength));
  252 + ^
  253 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
  254 + Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
  255 + ^
  256 +In file included from ../src/addon.cpp:3:
  257 +../src/http.h:293:110: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  258 + args.GetReturnValue().Set(newInstance = Local<Function>::New(args.GetIsolate(), httpPersistent)->NewInstance());
  259 + ^
  260 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:3674:52: note: 'NewInstance' has been explicitly marked deprecated here
  261 + V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  262 + ^
  263 +In file included from ../src/addon.cpp:3:
  264 +../src/http.h:320:80: warning: 'SetPrototype' is deprecated [-Wdeprecated-declarations]
  265 + express->Get(String::NewFromUtf8(isolate, "request"))->ToObject()->SetPrototype(Local<Object>::New(args.GetIsolate(), reqTemplate)->GetPrototype());
  266 + ^
  267 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:3095:43: note: 'SetPrototype' has been explicitly marked deprecated here
  268 + V8_DEPRECATED("Use maybe version", bool SetPrototype(Local<Value> prototype));
  269 + ^
  270 +In file included from ../src/addon.cpp:3:
  271 +../src/http.h:321:81: warning: 'SetPrototype' is deprecated [-Wdeprecated-declarations]
  272 + express->Get(String::NewFromUtf8(isolate, "response"))->ToObject()->SetPrototype(Local<Object>::New(args.GetIsolate(), resTemplate)->GetPrototype());
  273 + ^
  274 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:3095:43: note: 'SetPrototype' has been explicitly marked deprecated here
  275 + V8_DEPRECATED("Use maybe version", bool SetPrototype(Local<Value> prototype));
  276 + ^
  277 +In file included from ../src/addon.cpp:3:
  278 +../src/http.h:327:48: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  279 + args.GetReturnValue().Set(express->NewInstance());
  280 + ^
  281 +/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:3674:52: note: 'NewInstance' has been explicitly marked deprecated here
  282 + V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
  283 + ^
  284 +18 warnings generated.
  285 +./Release/.deps/Release/obj.target/uws/src/addon.o.d.raw Stats {
  286 + dev: 16777220,
  287 + mode: 33188,
  288 + nlink: 1,
  289 + uid: 501,
  290 + gid: 20,
  291 + rdev: 0,
  292 + blksize: 4096,
  293 + ino: 27524207,
  294 + size: 3567,
  295 + blocks: 8,
  296 + atimeMs: 1503372432000,
  297 + mtimeMs: 1503372432000,
  298 + ctimeMs: 1503372432000,
  299 + birthtimeMs: 1503372432000,
  300 + atime: 2017-08-22T03:27:12.000Z,
  301 + mtime: 2017-08-22T03:27:12.000Z,
  302 + ctime: 2017-08-22T03:27:12.000Z,
  303 + birthtime: 2017-08-22T03:27:12.000Z }
  304 + SOLINK_MODULE(target) Release/uws.node
  305 + ACTION binding_gyp_action_after_build_target_move_lib uws
  306 + TOUCH Release/obj.target/action_after_build.stamp
  307 +Release/obj.target/action_after_build.stamp Stats {
  308 + dev: 16777220,
  309 + mode: 33188,
  310 + nlink: 1,
  311 + uid: 501,
  312 + gid: 20,
  313 + rdev: 0,
  314 + blksize: 4096,
  315 + ino: 27524213,
  316 + size: 0,
  317 + blocks: 0,
  318 + atimeMs: 1503372433000,
  319 + mtimeMs: 1503372433000,
  320 + ctimeMs: 1503372433000,
  321 + birthtimeMs: 1503372433000,
  322 + atime: 2017-08-22T03:27:13.000Z,
  323 + mtime: 2017-08-22T03:27:13.000Z,
  324 + ctime: 2017-08-22T03:27:13.000Z,
  325 + birthtime: 2017-08-22T03:27:13.000Z }
  1 +{
  2 + "_args": [
  3 + [
  4 + {
  5 + "raw": "uws@~0.14.4",
  6 + "scope": null,
  7 + "escapedName": "uws",
  8 + "name": "uws",
  9 + "rawSpec": "~0.14.4",
  10 + "spec": ">=0.14.4 <0.15.0",
  11 + "type": "range"
  12 + },
  13 + "/Users/fzy/project/koa2_Sequelize_project/node_modules/engine.io"
  14 + ]
  15 + ],
  16 + "_from": "uws@>=0.14.4 <0.15.0",
  17 + "_id": "uws@0.14.5",
  18 + "_inCache": true,
  19 + "_location": "/uws",
  20 + "_nodeVersion": "5.11.0",
  21 + "_npmOperationalInternal": {
  22 + "host": "packages-18-east.internal.npmjs.com",
  23 + "tmp": "tmp/uws-0.14.5.tgz_1493399064525_0.939868062036112"
  24 + },
  25 + "_npmUser": {
  26 + "name": "alexhultman",
  27 + "email": "alexhultman@gmail.com"
  28 + },
  29 + "_npmVersion": "3.8.6",
  30 + "_phantomChildren": {},
  31 + "_requested": {
  32 + "raw": "uws@~0.14.4",
  33 + "scope": null,
  34 + "escapedName": "uws",
  35 + "name": "uws",
  36 + "rawSpec": "~0.14.4",
  37 + "spec": ">=0.14.4 <0.15.0",
  38 + "type": "range"
  39 + },
  40 + "_requiredBy": [
  41 + "/engine.io"
  42 + ],
  43 + "_resolved": "https://registry.npmjs.org/uws/-/uws-0.14.5.tgz",
  44 + "_shasum": "67aaf33c46b2a587a5f6666d00f7691328f149dc",
  45 + "_shrinkwrap": null,
  46 + "_spec": "uws@~0.14.4",
  47 + "_where": "/Users/fzy/project/koa2_Sequelize_project/node_modules/engine.io",
  48 + "author": {
  49 + "name": "Alex Hultman",
  50 + "email": "alexhultman@gmail.com",
  51 + "url": "https://github.com/alexhultman"
  52 + },
  53 + "bugs": {
  54 + "url": "https://github.com/uWebSockets/uWebSockets/issues"
  55 + },
  56 + "dependencies": {},
  57 + "description": "Tiny WebSockets",
  58 + "devDependencies": {},
  59 + "directories": {},
  60 + "dist": {
  61 + "shasum": "67aaf33c46b2a587a5f6666d00f7691328f149dc",
  62 + "tarball": "https://registry.npmjs.org/uws/-/uws-0.14.5.tgz"
  63 + },
  64 + "engines": {
  65 + "node": ">=4"
  66 + },
  67 + "homepage": "https://github.com/uWebSockets/uWebSockets",
  68 + "keywords": [
  69 + "tiny",
  70 + "websockets"
  71 + ],
  72 + "license": "Zlib",
  73 + "main": "uws.js",
  74 + "maintainers": [
  75 + {
  76 + "name": "alexhultman",
  77 + "email": "alexhultman@gmail.com"
  78 + }
  79 + ],
  80 + "name": "uws",
  81 + "optionalDependencies": {},
  82 + "readme": "## Usage\n`uws` tries to mimic `ws` as closely as possible without sacrificing too much performance. In most cases you simply swap `require('ws')` with `require('uws')`:\n\n```javascript\nvar WebSocketServer = require('uws').Server;\nvar wss = new WebSocketServer({ port: 3000 });\n\nfunction onMessage(message) {\n console.log('received: ' + message);\n}\n\nwss.on('connection', function(ws) {\n ws.on('message', onMessage);\n ws.send('something');\n});\n```\n\n##### Deviations from ws\nThere are some important incompatibilities with `ws` though, we aim to be ~90% compatible but will never implement behavior that is deemed too inefficient:\n\n* Binary data is passed zero-copy as an `ArrayBuffer`. This means you need to copy it to keep it past the callback. It also means you need to convert it with `Buffer.from(message)` if you expect a `Node.js Buffer`.\n* `webSocket._socket` is not a `net.Socket`, it is just a getter function with very basic functionalities.\n* `webSocket._socket.remote...` might fail, you need to cache it at connection.\n* `webSocket` acts like an `EventEmitter` with one listener per event maximum.\n* `webSocket.upgradeReq` is only valid during execution of the connection handler. If you want to keep properties of the upgradeReq for the entire lifetime of the webSocket you better attach that specific property to the webSocket at connection.\n\n## Installation\n[![](https://nodei.co/npm/uws.png)](https://www.npmjs.com/package/uws)\n\nAt installation `uws` will try to recompile itself using the system's C++11 compiler (GCC 4.8+, Clang 3.3, VC++ 2015+).\nIf this fails it will silently fall back to using the precompiled binaries.\nNPM installation will never fail but `require('uws')` will throw if it cannot properly load the binary module.\n",
  83 + "readmeFilename": "README.md",
  84 + "repository": {
  85 + "type": "git",
  86 + "url": "git+https://github.com/uWebSockets/uWebSockets.git"
  87 + },
  88 + "scripts": {
  89 + "install": "node-gyp rebuild > build_log.txt 2>&1 || exit 0"
  90 + },
  91 + "version": "0.14.5"
  92 +}
  1 +#ifndef ASIO_H
  2 +#define ASIO_H
  3 +
  4 +#include <boost/asio.hpp>
  5 +
  6 +typedef boost::asio::ip::tcp::socket::native_type uv_os_sock_t;
  7 +static const int UV_READABLE = 1;
  8 +static const int UV_WRITABLE = 2;
  9 +
  10 +struct Loop : boost::asio::io_service {
  11 +
  12 + static Loop *createLoop(bool defaultLoop = true) {
  13 + return new Loop;
  14 + }
  15 +
  16 + void destroy() {
  17 + delete this;
  18 + }
  19 +
  20 + void run() {
  21 + boost::asio::io_service::run();
  22 + }
  23 +};
  24 +
  25 +struct Timer {
  26 + boost::asio::deadline_timer asio_timer;
  27 + void *data;
  28 +
  29 + Timer(Loop *loop) : asio_timer(*loop) {
  30 +
  31 + }
  32 +
  33 + void start(void (*cb)(Timer *), int first, int repeat) {
  34 + asio_timer.expires_from_now(boost::posix_time::milliseconds(first));
  35 + asio_timer.async_wait([this, cb, repeat](const boost::system::error_code &ec) {
  36 + if (ec != boost::asio::error::operation_aborted) {
  37 + if (repeat) {
  38 + start(cb, repeat, repeat);
  39 + }
  40 + cb(this);
  41 + }
  42 + });
  43 + }
  44 +
  45 + void setData(void *data) {
  46 + this->data = data;
  47 + }
  48 +
  49 + void *getData() {
  50 + return data;
  51 + }
  52 +
  53 + // bug: cancel does not cancel expired timers!
  54 + // it has to guarantee that the timer is not called after
  55 + // stop is called! ffs boost!
  56 + void stop() {
  57 + asio_timer.cancel();
  58 + }
  59 +
  60 + void close() {
  61 + asio_timer.get_io_service().post([this]() {
  62 + delete this;
  63 + });
  64 + }
  65 +};
  66 +
  67 +struct Async {
  68 + Loop *loop;
  69 + void (*cb)(Async *);
  70 + void *data;
  71 +
  72 + boost::asio::io_service::work asio_work;
  73 +
  74 + Async(Loop *loop) : loop(loop), asio_work(*loop) {
  75 + }
  76 +
  77 + void start(void (*cb)(Async *)) {
  78 + this->cb = cb;
  79 + }
  80 +
  81 + void send() {
  82 + loop->post([this]() {
  83 + cb(this);
  84 + });
  85 + }
  86 +
  87 + void close() {
  88 + loop->post([this]() {
  89 + delete this;
  90 + });
  91 + }
  92 +
  93 + void setData(void *data) {
  94 + this->data = data;
  95 + }
  96 +
  97 + void *getData() {
  98 + return data;
  99 + }
  100 +};
  101 +
  102 +struct Poll {
  103 + boost::asio::posix::stream_descriptor *socket;
  104 + void (*cb)(Poll *p, int status, int events);
  105 +
  106 + Poll(Loop *loop, uv_os_sock_t fd) {
  107 + socket = new boost::asio::posix::stream_descriptor(*loop, fd);
  108 + socket->non_blocking(true);
  109 + }
  110 +
  111 + bool isClosed() {
  112 + return !socket;
  113 + }
  114 +
  115 + boost::asio::ip::tcp::socket::native_type getFd() {
  116 + return socket ? socket->native_handle() : -1;
  117 + }
  118 +
  119 + void setCb(void (*cb)(Poll *p, int status, int events)) {
  120 + this->cb = cb;
  121 + }
  122 +
  123 + void (*getCb())(Poll *, int, int) {
  124 + return cb;
  125 + }
  126 +
  127 + void reInit(Loop *loop, uv_os_sock_t fd) {
  128 + delete socket;
  129 + socket = new boost::asio::posix::stream_descriptor(*loop, fd);
  130 + socket->non_blocking(true);
  131 + }
  132 +
  133 + void start(Loop *, Poll *self, int events) {
  134 + if (events & UV_READABLE) {
  135 + socket->async_read_some(boost::asio::null_buffers(), [self](boost::system::error_code ec, std::size_t) {
  136 + if (ec != boost::asio::error::operation_aborted) {
  137 + self->start(nullptr, self, UV_READABLE);
  138 + self->cb(self, ec ? -1 : 0, UV_READABLE);
  139 + }
  140 + });
  141 + }
  142 +
  143 + if (events & UV_WRITABLE) {
  144 + socket->async_write_some(boost::asio::null_buffers(), [self](boost::system::error_code ec, std::size_t) {
  145 + if (ec != boost::asio::error::operation_aborted) {
  146 + self->start(nullptr, self, UV_WRITABLE);
  147 + self->cb(self, ec ? -1 : 0, UV_WRITABLE);
  148 + }
  149 + });
  150 + }
  151 + }
  152 +
  153 + void change(Loop *, Poll *self, int events) {
  154 + socket->cancel();
  155 + start(nullptr, self, events);
  156 + }
  157 +
  158 + bool fastTransfer(Loop *loop, Loop *newLoop, int events) {
  159 + return false;
  160 + }
  161 +
  162 + // todo: asio is thread safe, use it!
  163 + bool threadSafeChange(Loop *loop, Poll *self, int events) {
  164 + return false;
  165 + }
  166 +
  167 + void stop(Loop *) {
  168 + socket->cancel();
  169 + }
  170 +
  171 + // this is not correct, but it works for now
  172 + // think about transfer - should allow one to not delete
  173 + // but in this case it doesn't matter at all
  174 + void close(Loop *loop, void (*cb)(Poll *)) {
  175 + socket->release();
  176 + socket->get_io_service().post([cb, this]() {
  177 + cb(this);
  178 + });
  179 + delete socket;
  180 + socket = nullptr;
  181 + }
  182 +};
  183 +
  184 +#endif // ASIO_H
  1 +#ifndef BACKEND_H
  2 +#define BACKEND_H
  3 +
  4 +// Default to Epoll if nothing specified and on Linux
  5 +// Default to Libuv if nothing specified and not on Linux
  6 +#ifdef USE_ASIO
  7 +#include "Asio.h"
  8 +#elif !defined(__linux__) || defined(USE_LIBUV)
  9 +#include "Libuv.h"
  10 +#else
  11 +#define USE_EPOLL
  12 +#include "Epoll.h"
  13 +#endif
  14 +
  15 +#endif // BACKEND_H
  1 +#include "Backend.h"
  2 +
  3 +#ifdef USE_EPOLL
  4 +
  5 +// todo: remove this mutex, have callbacks set at program start
  6 +std::recursive_mutex cbMutex;
  7 +void (*callbacks[16])(Poll *, int, int);
  8 +int cbHead = 0;
  9 +
  10 +void Loop::run() {
  11 + timepoint = std::chrono::system_clock::now();
  12 + while (numPolls) {
  13 + for (std::pair<Poll *, void (*)(Poll *)> c : closing) {
  14 + numPolls--;
  15 +
  16 + c.second(c.first);
  17 +
  18 + if (!numPolls) {
  19 + closing.clear();
  20 + return;
  21 + }
  22 + }
  23 + closing.clear();
  24 +
  25 + int numFdReady = epoll_wait(epfd, readyEvents, 1024, delay);
  26 + timepoint = std::chrono::system_clock::now();
  27 +
  28 + if (preCb) {
  29 + preCb(preCbData);
  30 + }
  31 +
  32 + for (int i = 0; i < numFdReady; i++) {
  33 + Poll *poll = (Poll *) readyEvents[i].data.ptr;
  34 + int status = -bool(readyEvents[i].events & EPOLLERR);
  35 + callbacks[poll->state.cbIndex](poll, status, readyEvents[i].events);
  36 + }
  37 +
  38 + while (timers.size() && timers[0].timepoint < timepoint) {
  39 + Timer *timer = timers[0].timer;
  40 + cancelledLastTimer = false;
  41 + timers[0].cb(timers[0].timer);
  42 +
  43 + if (cancelledLastTimer) {
  44 + continue;
  45 + }
  46 +
  47 + int repeat = timers[0].nextDelay;
  48 + auto cb = timers[0].cb;
  49 + timers.erase(timers.begin());
  50 + if (repeat) {
  51 + timer->start(cb, repeat, repeat);
  52 + }
  53 + }
  54 +
  55 + if (postCb) {
  56 + postCb(postCbData);
  57 + }
  58 + }
  59 +}
  60 +#endif
  1 +#ifndef EPOLL_H
  2 +#define EPOLL_H
  3 +
  4 +#include <sys/epoll.h>
  5 +#include <sys/eventfd.h>
  6 +#include <unistd.h>
  7 +#include <fcntl.h>
  8 +#include <chrono>
  9 +#include <algorithm>
  10 +#include <vector>
  11 +#include <mutex>
  12 +
  13 +typedef int uv_os_sock_t;
  14 +static const int UV_READABLE = EPOLLIN;
  15 +static const int UV_WRITABLE = EPOLLOUT;
  16 +
  17 +struct Poll;
  18 +struct Timer;
  19 +
  20 +extern std::recursive_mutex cbMutex;
  21 +extern void (*callbacks[16])(Poll *, int, int);
  22 +extern int cbHead;
  23 +
  24 +struct Timepoint {
  25 + void (*cb)(Timer *);
  26 + Timer *timer;
  27 + std::chrono::system_clock::time_point timepoint;
  28 + int nextDelay;
  29 +};
  30 +
  31 +struct Loop {
  32 + int epfd;
  33 + int numPolls = 0;
  34 + bool cancelledLastTimer;
  35 + int delay = -1;
  36 + epoll_event readyEvents[1024];
  37 + std::chrono::system_clock::time_point timepoint;
  38 + std::vector<Timepoint> timers;
  39 + std::vector<std::pair<Poll *, void (*)(Poll *)>> closing;
  40 +
  41 + void (*preCb)(void *) = nullptr;
  42 + void (*postCb)(void *) = nullptr;
  43 + void *preCbData, *postCbData;
  44 +
  45 + Loop(bool defaultLoop) {
  46 + epfd = epoll_create1(EPOLL_CLOEXEC);
  47 + timepoint = std::chrono::system_clock::now();
  48 + }
  49 +
  50 + static Loop *createLoop(bool defaultLoop = true) {
  51 + return new Loop(defaultLoop);
  52 + }
  53 +
  54 + void destroy() {
  55 + ::close(epfd);
  56 + delete this;
  57 + }
  58 +
  59 + void run();
  60 +
  61 + int getEpollFd() {
  62 + return epfd;
  63 + }
  64 +};
  65 +
  66 +struct Timer {
  67 + Loop *loop;
  68 + void *data;
  69 +
  70 + Timer(Loop *loop) {
  71 + this->loop = loop;
  72 + }
  73 +
  74 + void start(void (*cb)(Timer *), int timeout, int repeat) {
  75 + loop->timepoint = std::chrono::system_clock::now();
  76 + std::chrono::system_clock::time_point timepoint = loop->timepoint + std::chrono::milliseconds(timeout);
  77 +
  78 + Timepoint t = {cb, this, timepoint, repeat};
  79 + loop->timers.insert(
  80 + std::upper_bound(loop->timers.begin(), loop->timers.end(), t, [](const Timepoint &a, const Timepoint &b) {
  81 + return a.timepoint < b.timepoint;
  82 + }),
  83 + t
  84 + );
  85 +
  86 + loop->delay = -1;
  87 + if (loop->timers.size()) {
  88 + loop->delay = std::max<int>(std::chrono::duration_cast<std::chrono::milliseconds>(loop->timers[0].timepoint - loop->timepoint).count(), 0);
  89 + }
  90 + }
  91 +
  92 + void setData(void *data) {
  93 + this->data = data;
  94 + }
  95 +
  96 + void *getData() {
  97 + return data;
  98 + }
  99 +
  100 + // always called before destructor
  101 + void stop() {
  102 + auto pos = loop->timers.begin();
  103 + for (Timepoint &t : loop->timers) {
  104 + if (t.timer == this) {
  105 + loop->timers.erase(pos);
  106 + break;
  107 + }
  108 + pos++;
  109 + }
  110 + loop->cancelledLastTimer = true;
  111 +
  112 + loop->delay = -1;
  113 + if (loop->timers.size()) {
  114 + loop->delay = std::max<int>(std::chrono::duration_cast<std::chrono::milliseconds>(loop->timers[0].timepoint - loop->timepoint).count(), 0);
  115 + }
  116 + }
  117 +
  118 + void close() {
  119 + delete this;
  120 + }
  121 +};
  122 +
  123 +// 4 bytes
  124 +struct Poll {
  125 +protected:
  126 + struct {
  127 + int fd : 28;
  128 + unsigned int cbIndex : 4;
  129 + } state = {-1, 0};
  130 +
  131 + Poll(Loop *loop, uv_os_sock_t fd) {
  132 + fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
  133 + state.fd = fd;
  134 + loop->numPolls++;
  135 + }
  136 +
  137 + // todo: pre-set all of callbacks up front and remove mutex
  138 + void setCb(void (*cb)(Poll *p, int status, int events)) {
  139 + cbMutex.lock();
  140 + state.cbIndex = cbHead;
  141 + for (int i = 0; i < cbHead; i++) {
  142 + if (callbacks[i] == cb) {
  143 + state.cbIndex = i;
  144 + break;
  145 + }
  146 + }
  147 + if (state.cbIndex == cbHead) {
  148 + callbacks[cbHead++] = cb;
  149 + }
  150 + cbMutex.unlock();
  151 + }
  152 +
  153 + void (*getCb())(Poll *, int, int) {
  154 + return callbacks[state.cbIndex];
  155 + }
  156 +
  157 + void reInit(Loop *loop, uv_os_sock_t fd) {
  158 + state.fd = fd;
  159 + loop->numPolls++;
  160 + }
  161 +
  162 + void start(Loop *loop, Poll *self, int events) {
  163 + epoll_event event;
  164 + event.events = events;
  165 + event.data.ptr = self;
  166 + epoll_ctl(loop->epfd, EPOLL_CTL_ADD, state.fd, &event);
  167 + }
  168 +
  169 + void change(Loop *loop, Poll *self, int events) {
  170 + epoll_event event;
  171 + event.events = events;
  172 + event.data.ptr = self;
  173 + epoll_ctl(loop->epfd, EPOLL_CTL_MOD, state.fd, &event);
  174 + }
  175 +
  176 + void stop(Loop *loop) {
  177 + epoll_event event;
  178 + epoll_ctl(loop->epfd, EPOLL_CTL_DEL, state.fd, &event);
  179 + }
  180 +
  181 + bool fastTransfer(Loop *loop, Loop *newLoop, int events) {
  182 + stop(loop);
  183 + start(newLoop, this, events);
  184 + loop->numPolls--;
  185 + // needs to lock the newLoop's numPolls!
  186 + newLoop->numPolls++;
  187 + return true;
  188 + }
  189 +
  190 + bool threadSafeChange(Loop *loop, Poll *self, int events) {
  191 + change(loop, self, events);
  192 + return true;
  193 + }
  194 +
  195 + void close(Loop *loop, void (*cb)(Poll *)) {
  196 + state.fd = -1;
  197 + loop->closing.push_back({this, cb});
  198 + }
  199 +
  200 +public:
  201 + bool isClosed() {
  202 + return state.fd == -1;
  203 + }
  204 +
  205 + uv_os_sock_t getFd() {
  206 + return state.fd;
  207 + }
  208 +
  209 + friend struct Loop;
  210 +};
  211 +
  212 +// this should be put in the Loop as a general "post" function always available
  213 +struct Async : Poll {
  214 + void (*cb)(Async *);
  215 + Loop *loop;
  216 + void *data;
  217 +
  218 + Async(Loop *loop) : Poll(loop, ::eventfd(0, EFD_CLOEXEC)) {
  219 + this->loop = loop;
  220 + }
  221 +
  222 + void start(void (*cb)(Async *)) {
  223 + this->cb = cb;
  224 + Poll::setCb([](Poll *p, int, int) {
  225 + uint64_t val;
  226 + if (::read(((Async *) p)->state.fd, &val, 8) == 8) {
  227 + ((Async *) p)->cb((Async *) p);
  228 + }
  229 + });
  230 + Poll::start(loop, this, UV_READABLE);
  231 + }
  232 +
  233 + void send() {
  234 + uint64_t one = 1;
  235 + if (::write(state.fd, &one, 8) != 8) {
  236 + return;
  237 + }
  238 + }
  239 +
  240 + void close() {
  241 + Poll::stop(loop);
  242 + ::close(state.fd);
  243 + Poll::close(loop, [](Poll *p) {
  244 + delete p;
  245 + });
  246 + }
  247 +
  248 + void setData(void *data) {
  249 + this->data = data;
  250 + }
  251 +
  252 + void *getData() {
  253 + return data;
  254 + }
  255 +};
  256 +
  257 +#endif // EPOLL_H
  1 +#include "Extensions.h"
  2 +
  3 +namespace uWS {
  4 +
  5 +enum ExtensionTokens {
  6 + TOK_PERMESSAGE_DEFLATE = 1838,
  7 + TOK_SERVER_NO_CONTEXT_TAKEOVER = 2807,
  8 + TOK_CLIENT_NO_CONTEXT_TAKEOVER = 2783,
  9 + TOK_SERVER_MAX_WINDOW_BITS = 2372,
  10 + TOK_CLIENT_MAX_WINDOW_BITS = 2348
  11 +};
  12 +
  13 +class ExtensionsParser {
  14 +private:
  15 + int *lastInteger = nullptr;
  16 +
  17 +public:
  18 + bool perMessageDeflate = false;
  19 + bool serverNoContextTakeover = false;
  20 + bool clientNoContextTakeover = false;
  21 + int serverMaxWindowBits = 0;
  22 + int clientMaxWindowBits = 0;
  23 +
  24 + int getToken(const char *&in, const char *stop);
  25 + ExtensionsParser(const char *data, size_t length);
  26 +};
  27 +
  28 +int ExtensionsParser::getToken(const char *&in, const char *stop) {
  29 + while (!isalnum(*in) && in != stop) {
  30 + in++;
  31 + }
  32 +
  33 + int hashedToken = 0;
  34 + while (isalnum(*in) || *in == '-' || *in == '_') {
  35 + if (isdigit(*in)) {
  36 + hashedToken = hashedToken * 10 - (*in - '0');
  37 + } else {
  38 + hashedToken += *in;
  39 + }
  40 + in++;
  41 + }
  42 + return hashedToken;
  43 +}
  44 +
  45 +ExtensionsParser::ExtensionsParser(const char *data, size_t length) {
  46 + const char *stop = data + length;
  47 + int token = 1;
  48 + for (; token && token != TOK_PERMESSAGE_DEFLATE; token = getToken(data, stop));
  49 +
  50 + perMessageDeflate = (token == TOK_PERMESSAGE_DEFLATE);
  51 + while ((token = getToken(data, stop))) {
  52 + switch (token) {
  53 + case TOK_PERMESSAGE_DEFLATE:
  54 + return;
  55 + case TOK_SERVER_NO_CONTEXT_TAKEOVER:
  56 + serverNoContextTakeover = true;
  57 + break;
  58 + case TOK_CLIENT_NO_CONTEXT_TAKEOVER:
  59 + clientNoContextTakeover = true;
  60 + break;
  61 + case TOK_SERVER_MAX_WINDOW_BITS:
  62 + serverMaxWindowBits = 1;
  63 + lastInteger = &serverMaxWindowBits;
  64 + break;
  65 + case TOK_CLIENT_MAX_WINDOW_BITS:
  66 + clientMaxWindowBits = 1;
  67 + lastInteger = &clientMaxWindowBits;
  68 + break;
  69 + default:
  70 + if (token < 0 && lastInteger) {
  71 + *lastInteger = -token;
  72 + }
  73 + break;
  74 + }
  75 + }
  76 +}
  77 +
  78 +template <bool isServer>
  79 +ExtensionsNegotiator<isServer>::ExtensionsNegotiator(int wantedOptions) {
  80 + options = wantedOptions;
  81 +}
  82 +
  83 +template <bool isServer>
  84 +std::string ExtensionsNegotiator<isServer>::generateOffer() {
  85 + std::string extensionsOffer;
  86 + if (options & Options::PERMESSAGE_DEFLATE) {
  87 + extensionsOffer += "permessage-deflate";
  88 +
  89 + if (options & Options::CLIENT_NO_CONTEXT_TAKEOVER) {
  90 + extensionsOffer += "; client_no_context_takeover";
  91 + }
  92 +
  93 + if (options & Options::SERVER_NO_CONTEXT_TAKEOVER) {
  94 + extensionsOffer += "; server_no_context_takeover";
  95 + }
  96 + }
  97 +
  98 + return extensionsOffer;
  99 +}
  100 +
  101 +template <bool isServer>
  102 +void ExtensionsNegotiator<isServer>::readOffer(std::string offer) {
  103 + if (isServer) {
  104 + ExtensionsParser extensionsParser(offer.data(), offer.length());
  105 + if ((options & PERMESSAGE_DEFLATE) && extensionsParser.perMessageDeflate) {
  106 + if (extensionsParser.clientNoContextTakeover || (options & CLIENT_NO_CONTEXT_TAKEOVER)) {
  107 + options |= CLIENT_NO_CONTEXT_TAKEOVER;
  108 + }
  109 +
  110 + if (extensionsParser.serverNoContextTakeover) {
  111 + options |= SERVER_NO_CONTEXT_TAKEOVER;
  112 + } else {
  113 + options &= ~SERVER_NO_CONTEXT_TAKEOVER;
  114 + }
  115 + } else {
  116 + options &= ~PERMESSAGE_DEFLATE;
  117 + }
  118 + } else {
  119 + // todo!
  120 + }
  121 +}
  122 +
  123 +template <bool isServer>
  124 +int ExtensionsNegotiator<isServer>::getNegotiatedOptions() {
  125 + return options;
  126 +}
  127 +
  128 +template class ExtensionsNegotiator<true>;
  129 +template class ExtensionsNegotiator<false>;
  130 +
  131 +}
  1 +#ifndef EXTENSIONS_UWS_H
  2 +#define EXTENSIONS_UWS_H
  3 +
  4 +#include <string>
  5 +
  6 +namespace uWS {
  7 +
  8 +enum Options : unsigned int {
  9 + NO_OPTIONS = 0,
  10 + PERMESSAGE_DEFLATE = 1,
  11 + SERVER_NO_CONTEXT_TAKEOVER = 2,
  12 + CLIENT_NO_CONTEXT_TAKEOVER = 4,
  13 + NO_DELAY = 8
  14 +};
  15 +
  16 +template <bool isServer>
  17 +class ExtensionsNegotiator {
  18 +private:
  19 + int options;
  20 +public:
  21 + ExtensionsNegotiator(int wantedOptions);
  22 + std::string generateOffer();
  23 + void readOffer(std::string offer);
  24 + int getNegotiatedOptions();
  25 +};
  26 +
  27 +}
  28 +
  29 +#endif // EXTENSIONS_UWS_H
  1 +#include "Group.h"
  2 +#include "Hub.h"
  3 +
  4 +namespace uWS {
  5 +
  6 +template <bool isServer>
  7 +void Group<isServer>::setUserData(void *user) {
  8 + this->userData = user;
  9 +}
  10 +
  11 +template <bool isServer>
  12 +void *Group<isServer>::getUserData() {
  13 + return userData;
  14 +}
  15 +
  16 +template <bool isServer>
  17 +void Group<isServer>::timerCallback(Timer *timer) {
  18 + Group<isServer> *group = (Group<isServer> *) timer->getData();
  19 +
  20 + group->forEach([](uWS::WebSocket<isServer> *webSocket) {
  21 + if (webSocket->hasOutstandingPong) {
  22 + webSocket->terminate();
  23 + } else {
  24 + webSocket->hasOutstandingPong = true;
  25 + }
  26 + });
  27 +
  28 + if (group->userPingMessage.length()) {
  29 + group->broadcast(group->userPingMessage.data(), group->userPingMessage.length(), OpCode::TEXT);
  30 + } else {
  31 + group->broadcast(nullptr, 0, OpCode::PING);
  32 + }
  33 +}
  34 +
  35 +template <bool isServer>
  36 +void Group<isServer>::startAutoPing(int intervalMs, std::string userMessage) {
  37 + timer = new Timer(loop);
  38 + timer->setData(this);
  39 + timer->start(timerCallback, intervalMs, intervalMs);
  40 + userPingMessage = userMessage;
  41 +}
  42 +
  43 +template <bool isServer>
  44 +void Group<isServer>::addHttpSocket(HttpSocket<isServer> *httpSocket) {
  45 + if (httpSocketHead) {
  46 + httpSocketHead->prev = httpSocket;
  47 + httpSocket->next = httpSocketHead;
  48 + } else {
  49 + httpSocket->next = nullptr;
  50 + // start timer
  51 + httpTimer = new Timer(hub->getLoop());
  52 + httpTimer->setData(this);
  53 + httpTimer->start([](Timer *httpTimer) {
  54 + Group<isServer> *group = (Group<isServer> *) httpTimer->getData();
  55 + group->forEachHttpSocket([](HttpSocket<isServer> *httpSocket) {
  56 + if (httpSocket->missedDeadline) {
  57 + httpSocket->terminate();
  58 + } else if (!httpSocket->outstandingResponsesHead) {
  59 + httpSocket->missedDeadline = true;
  60 + }
  61 + });
  62 + }, 1000, 1000);
  63 + }
  64 + httpSocketHead = httpSocket;
  65 + httpSocket->prev = nullptr;
  66 +}
  67 +
  68 +template <bool isServer>
  69 +void Group<isServer>::removeHttpSocket(HttpSocket<isServer> *httpSocket) {
  70 + if (iterators.size()) {
  71 + iterators.top() = httpSocket->next;
  72 + }
  73 + if (httpSocket->prev == httpSocket->next) {
  74 + httpSocketHead = nullptr;
  75 + httpTimer->stop();
  76 + httpTimer->close();
  77 + } else {
  78 + if (httpSocket->prev) {
  79 + ((HttpSocket<isServer> *) httpSocket->prev)->next = httpSocket->next;
  80 + } else {
  81 + httpSocketHead = (HttpSocket<isServer> *) httpSocket->next;
  82 + }
  83 + if (httpSocket->next) {
  84 + ((HttpSocket<isServer> *) httpSocket->next)->prev = httpSocket->prev;
  85 + }
  86 + }
  87 +}
  88 +
  89 +template <bool isServer>
  90 +void Group<isServer>::addWebSocket(WebSocket<isServer> *webSocket) {
  91 + if (webSocketHead) {
  92 + webSocketHead->prev = webSocket;
  93 + webSocket->next = webSocketHead;
  94 + } else {
  95 + webSocket->next = nullptr;
  96 + }
  97 + webSocketHead = webSocket;
  98 + webSocket->prev = nullptr;
  99 +}
  100 +
  101 +template <bool isServer>
  102 +void Group<isServer>::removeWebSocket(WebSocket<isServer> *webSocket) {
  103 + if (iterators.size()) {
  104 + iterators.top() = webSocket->next;
  105 + }
  106 + if (webSocket->prev == webSocket->next) {
  107 + webSocketHead = nullptr;
  108 + } else {
  109 + if (webSocket->prev) {
  110 + ((WebSocket<isServer> *) webSocket->prev)->next = webSocket->next;
  111 + } else {
  112 + webSocketHead = (WebSocket<isServer> *) webSocket->next;
  113 + }
  114 + if (webSocket->next) {
  115 + ((WebSocket<isServer> *) webSocket->next)->prev = webSocket->prev;
  116 + }
  117 + }
  118 +}
  119 +
  120 +template <bool isServer>
  121 +Group<isServer>::Group(int extensionOptions, unsigned int maxPayload, Hub *hub, uS::NodeData *nodeData) : uS::NodeData(*nodeData), maxPayload(maxPayload), hub(hub), extensionOptions(extensionOptions) {
  122 + connectionHandler = [](WebSocket<isServer> *, HttpRequest) {};
  123 + transferHandler = [](WebSocket<isServer> *) {};
  124 + messageHandler = [](WebSocket<isServer> *, char *, size_t, OpCode) {};
  125 + disconnectionHandler = [](WebSocket<isServer> *, int, char *, size_t) {};
  126 + pingHandler = pongHandler = [](WebSocket<isServer> *, char *, size_t) {};
  127 + errorHandler = [](errorType) {};
  128 + httpRequestHandler = [](HttpResponse *, HttpRequest, char *, size_t, size_t) {};
  129 + httpConnectionHandler = [](HttpSocket<isServer> *) {};
  130 + httpDisconnectionHandler = [](HttpSocket<isServer> *) {};
  131 + httpCancelledRequestHandler = [](HttpResponse *) {};
  132 + httpDataHandler = [](HttpResponse *, char *, size_t, size_t) {};
  133 +
  134 + this->extensionOptions |= CLIENT_NO_CONTEXT_TAKEOVER | SERVER_NO_CONTEXT_TAKEOVER;
  135 +}
  136 +
  137 +template <bool isServer>
  138 +void Group<isServer>::stopListening() {
  139 + if (isServer) {
  140 + if (user) {
  141 + // todo: we should allow one group to listen to many ports!
  142 + uS::ListenSocket *listenSocket = (uS::ListenSocket *) user;
  143 +
  144 + if (listenSocket->timer) {
  145 + listenSocket->timer->stop();
  146 + listenSocket->timer->close();
  147 + }
  148 +
  149 + listenSocket->closeSocket<uS::ListenSocket>();
  150 +
  151 + // mark as stopped listening (extra care?)
  152 + user = nullptr;
  153 + }
  154 + }
  155 +
  156 + if (async) {
  157 + async->close();
  158 + }
  159 +}
  160 +
  161 +template <bool isServer>
  162 +void Group<isServer>::onConnection(std::function<void (WebSocket<isServer> *, HttpRequest)> handler) {
  163 + connectionHandler = handler;
  164 +}
  165 +
  166 +template <bool isServer>
  167 +void Group<isServer>::onTransfer(std::function<void (WebSocket<isServer> *)> handler) {
  168 + transferHandler = handler;
  169 +}
  170 +
  171 +template <bool isServer>
  172 +void Group<isServer>::onMessage(std::function<void (WebSocket<isServer> *, char *, size_t, OpCode)> handler) {
  173 + messageHandler = handler;
  174 +}
  175 +
  176 +template <bool isServer>
  177 +void Group<isServer>::onDisconnection(std::function<void (WebSocket<isServer> *, int, char *, size_t)> handler) {
  178 + disconnectionHandler = handler;
  179 +}
  180 +
  181 +template <bool isServer>
  182 +void Group<isServer>::onPing(std::function<void (WebSocket<isServer> *, char *, size_t)> handler) {
  183 + pingHandler = handler;
  184 +}
  185 +
  186 +template <bool isServer>
  187 +void Group<isServer>::onPong(std::function<void (WebSocket<isServer> *, char *, size_t)> handler) {
  188 + pongHandler = handler;
  189 +}
  190 +
  191 +template <bool isServer>
  192 +void Group<isServer>::onError(std::function<void (typename Group::errorType)> handler) {
  193 + errorHandler = handler;
  194 +}
  195 +
  196 +template <bool isServer>
  197 +void Group<isServer>::onHttpConnection(std::function<void (HttpSocket<isServer> *)> handler) {
  198 + httpConnectionHandler = handler;
  199 +}
  200 +
  201 +template <bool isServer>
  202 +void Group<isServer>::onHttpRequest(std::function<void (HttpResponse *, HttpRequest, char *, size_t, size_t)> handler) {
  203 + httpRequestHandler = handler;
  204 +}
  205 +
  206 +template <bool isServer>
  207 +void Group<isServer>::onHttpData(std::function<void(HttpResponse *, char *, size_t, size_t)> handler) {
  208 + httpDataHandler = handler;
  209 +}
  210 +
  211 +template <bool isServer>
  212 +void Group<isServer>::onHttpDisconnection(std::function<void (HttpSocket<isServer> *)> handler) {
  213 + httpDisconnectionHandler = handler;
  214 +}
  215 +
  216 +template <bool isServer>
  217 +void Group<isServer>::onCancelledHttpRequest(std::function<void (HttpResponse *)> handler) {
  218 + httpCancelledRequestHandler = handler;
  219 +}
  220 +
  221 +template <bool isServer>
  222 +void Group<isServer>::onHttpUpgrade(std::function<void(HttpSocket<isServer> *, HttpRequest)> handler) {
  223 + httpUpgradeHandler = handler;
  224 +}
  225 +
  226 +template <bool isServer>
  227 +void Group<isServer>::broadcast(const char *message, size_t length, OpCode opCode) {
  228 +
  229 +#ifdef UWS_THREADSAFE
  230 + std::lock_guard<std::recursive_mutex> lockGuard(*asyncMutex);
  231 +#endif
  232 +
  233 + typename WebSocket<isServer>::PreparedMessage *preparedMessage = WebSocket<isServer>::prepareMessage((char *) message, length, opCode, false);
  234 + forEach([preparedMessage](uWS::WebSocket<isServer> *ws) {
  235 + ws->sendPrepared(preparedMessage);
  236 + });
  237 + WebSocket<isServer>::finalizeMessage(preparedMessage);
  238 +}
  239 +
  240 +template <bool isServer>
  241 +void Group<isServer>::terminate() {
  242 + forEach([](uWS::WebSocket<isServer> *ws) {
  243 + ws->terminate();
  244 + });
  245 + stopListening();
  246 +}
  247 +
  248 +template <bool isServer>
  249 +void Group<isServer>::close(int code, char *message, size_t length) {
  250 + forEach([code, message, length](uWS::WebSocket<isServer> *ws) {
  251 + ws->close(code, message, length);
  252 + });
  253 + stopListening();
  254 + if (timer) {
  255 + timer->stop();
  256 + timer->close();
  257 + }
  258 +}
  259 +
  260 +template struct Group<true>;
  261 +template struct Group<false>;
  262 +
  263 +}
  1 +#ifndef GROUP_UWS_H
  2 +#define GROUP_UWS_H
  3 +
  4 +#include "WebSocket.h"
  5 +#include "HTTPSocket.h"
  6 +#include "Extensions.h"
  7 +#include <functional>
  8 +#include <stack>
  9 +
  10 +namespace uWS {
  11 +
  12 +enum ListenOptions {
  13 + TRANSFERS
  14 +};
  15 +
  16 +struct Hub;
  17 +
  18 +template <bool isServer>
  19 +struct WIN32_EXPORT Group : private uS::NodeData {
  20 +protected:
  21 + friend struct Hub;
  22 + friend struct WebSocket<isServer>;
  23 + friend struct HttpSocket<false>;
  24 + friend struct HttpSocket<true>;
  25 +
  26 + std::function<void(WebSocket<isServer> *, HttpRequest)> connectionHandler;
  27 + std::function<void(WebSocket<isServer> *)> transferHandler;
  28 + std::function<void(WebSocket<isServer> *, char *message, size_t length, OpCode opCode)> messageHandler;
  29 + std::function<void(WebSocket<isServer> *, int code, char *message, size_t length)> disconnectionHandler;
  30 + std::function<void(WebSocket<isServer> *, char *, size_t)> pingHandler;
  31 + std::function<void(WebSocket<isServer> *, char *, size_t)> pongHandler;
  32 + std::function<void(HttpSocket<isServer> *)> httpConnectionHandler;
  33 + std::function<void(HttpResponse *, HttpRequest, char *, size_t, size_t)> httpRequestHandler;
  34 + std::function<void(HttpResponse *, char *, size_t, size_t)> httpDataHandler;
  35 + std::function<void(HttpResponse *)> httpCancelledRequestHandler;
  36 + std::function<void(HttpSocket<isServer> *)> httpDisconnectionHandler;
  37 + std::function<void(HttpSocket<isServer> *, HttpRequest)> httpUpgradeHandler;
  38 +
  39 + using errorType = typename std::conditional<isServer, int, void *>::type;
  40 + std::function<void(errorType)> errorHandler;
  41 +
  42 + unsigned int maxPayload;
  43 + Hub *hub;
  44 + int extensionOptions;
  45 + Timer *timer = nullptr, *httpTimer = nullptr;
  46 + std::string userPingMessage;
  47 + std::stack<Poll *> iterators;
  48 +
  49 + // todo: cannot be named user, collides with parent!
  50 + void *userData = nullptr;
  51 + static void timerCallback(Timer *timer);
  52 +
  53 + WebSocket<isServer> *webSocketHead = nullptr;
  54 + HttpSocket<isServer> *httpSocketHead = nullptr;
  55 +
  56 + void addWebSocket(WebSocket<isServer> *webSocket);
  57 + void removeWebSocket(WebSocket<isServer> *webSocket);
  58 +
  59 + // todo: remove these, template
  60 + void addHttpSocket(HttpSocket<isServer> *httpSocket);
  61 + void removeHttpSocket(HttpSocket<isServer> *httpSocket);
  62 +
  63 + Group(int extensionOptions, unsigned int maxPayload, Hub *hub, uS::NodeData *nodeData);
  64 + void stopListening();
  65 +
  66 +public:
  67 + void onConnection(std::function<void(WebSocket<isServer> *, HttpRequest)> handler);
  68 + void onTransfer(std::function<void(WebSocket<isServer> *)> handler);
  69 + void onMessage(std::function<void(WebSocket<isServer> *, char *, size_t, OpCode)> handler);
  70 + void onDisconnection(std::function<void(WebSocket<isServer> *, int code, char *message, size_t length)> handler);
  71 + void onPing(std::function<void(WebSocket<isServer> *, char *, size_t)> handler);
  72 + void onPong(std::function<void(WebSocket<isServer> *, char *, size_t)> handler);
  73 + void onError(std::function<void(errorType)> handler);
  74 + void onHttpConnection(std::function<void(HttpSocket<isServer> *)> handler);
  75 + void onHttpRequest(std::function<void(HttpResponse *, HttpRequest, char *data, size_t length, size_t remainingBytes)> handler);
  76 + void onHttpData(std::function<void(HttpResponse *, char *data, size_t length, size_t remainingBytes)> handler);
  77 + void onHttpDisconnection(std::function<void(HttpSocket<isServer> *)> handler);
  78 + void onCancelledHttpRequest(std::function<void(HttpResponse *)> handler);
  79 + void onHttpUpgrade(std::function<void(HttpSocket<isServer> *, HttpRequest)> handler);
  80 +
  81 + // Thread safe
  82 + void broadcast(const char *message, size_t length, OpCode opCode);
  83 + void setUserData(void *user);
  84 + void *getUserData();
  85 +
  86 + // Not thread safe
  87 + void terminate();
  88 + void close(int code = 1000, char *message = nullptr, size_t length = 0);
  89 + void startAutoPing(int intervalMs, std::string userMessage = "");
  90 +
  91 + // same as listen(TRANSFERS), backwards compatible API for now
  92 + void addAsync() {
  93 + if (!async) {
  94 + NodeData::addAsync();
  95 + }
  96 + }
  97 +
  98 + void listen(ListenOptions listenOptions) {
  99 + if (listenOptions == TRANSFERS && !async) {
  100 + addAsync();
  101 + }
  102 + }
  103 +
  104 + template <class F>
  105 + void forEach(const F &cb) {
  106 + Poll *iterator = webSocketHead;
  107 + iterators.push(iterator);
  108 + while (iterator) {
  109 + Poll *lastIterator = iterator;
  110 + cb((WebSocket<isServer> *) iterator);
  111 + iterator = iterators.top();
  112 + if (lastIterator == iterator) {
  113 + iterator = ((uS::Socket *) iterator)->next;
  114 + iterators.top() = iterator;
  115 + }
  116 + }
  117 + iterators.pop();
  118 + }
  119 +
  120 + // duplicated code for now!
  121 + template <class F>
  122 + void forEachHttpSocket(const F &cb) {
  123 + Poll *iterator = httpSocketHead;
  124 + iterators.push(iterator);
  125 + while (iterator) {
  126 + Poll *lastIterator = iterator;
  127 + cb((HttpSocket<isServer> *) iterator);
  128 + iterator = iterators.top();
  129 + if (lastIterator == iterator) {
  130 + iterator = ((uS::Socket *) iterator)->next;
  131 + iterators.top() = iterator;
  132 + }
  133 + }
  134 + iterators.pop();
  135 + }
  136 +
  137 + static Group<isServer> *from(uS::Socket *s) {
  138 + return static_cast<Group<isServer> *>(s->getNodeData());
  139 + }
  140 +};
  141 +
  142 +}
  143 +
  144 +#endif // GROUP_UWS_H
  1 +#include "HTTPSocket.h"
  2 +#include "Group.h"
  3 +#include "Extensions.h"
  4 +#include <cstdio>
  5 +
  6 +#define MAX_HEADERS 100
  7 +#define MAX_HEADER_BUFFER_SIZE 4096
  8 +#define FORCE_SLOW_PATH false
  9 +
  10 +namespace uWS {
  11 +
  12 +// UNSAFETY NOTE: assumes *end == '\r' (might unref end pointer)
  13 +char *getHeaders(char *buffer, char *end, Header *headers, size_t maxHeaders) {
  14 + for (unsigned int i = 0; i < maxHeaders; i++) {
  15 + for (headers->key = buffer; (*buffer != ':') & (*buffer > 32); *(buffer++) |= 32);
  16 + if (*buffer == '\r') {
  17 + if ((buffer != end) & (buffer[1] == '\n') & (i > 0)) {
  18 + headers->key = nullptr;
  19 + return buffer + 2;
  20 + } else {
  21 + return nullptr;
  22 + }
  23 + } else {
  24 + headers->keyLength = buffer - headers->key;
  25 + for (buffer++; (*buffer == ':' || *buffer < 33) && *buffer != '\r'; buffer++);
  26 + headers->value = buffer;
  27 + buffer = (char *) memchr(buffer, '\r', end - buffer); //for (; *buffer != '\r'; buffer++);
  28 + if (buffer /*!= end*/ && buffer[1] == '\n') {
  29 + headers->valueLength = buffer - headers->value;
  30 + buffer += 2;
  31 + headers++;
  32 + } else {
  33 + return nullptr;
  34 + }
  35 + }
  36 + }
  37 + return nullptr;
  38 +}
  39 +
  40 +// UNSAFETY NOTE: assumes 24 byte input length
  41 +static void base64(unsigned char *src, char *dst) {
  42 + static const char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  43 + for (int i = 0; i < 18; i += 3) {
  44 + *dst++ = b64[(src[i] >> 2) & 63];
  45 + *dst++ = b64[((src[i] & 3) << 4) | ((src[i + 1] & 240) >> 4)];
  46 + *dst++ = b64[((src[i + 1] & 15) << 2) | ((src[i + 2] & 192) >> 6)];
  47 + *dst++ = b64[src[i + 2] & 63];
  48 + }
  49 + *dst++ = b64[(src[18] >> 2) & 63];
  50 + *dst++ = b64[((src[18] & 3) << 4) | ((src[19] & 240) >> 4)];
  51 + *dst++ = b64[((src[19] & 15) << 2)];
  52 + *dst++ = '=';
  53 +}
  54 +
  55 +template <bool isServer>
  56 +uS::Socket *HttpSocket<isServer>::onData(uS::Socket *s, char *data, size_t length) {
  57 + HttpSocket<isServer> *httpSocket = (HttpSocket<isServer> *) s;
  58 +
  59 + httpSocket->cork(true);
  60 +
  61 + if (httpSocket->contentLength) {
  62 + httpSocket->missedDeadline = false;
  63 + if (httpSocket->contentLength >= length) {
  64 + Group<isServer>::from(httpSocket)->httpDataHandler(httpSocket->outstandingResponsesTail, data, length, httpSocket->contentLength -= length);
  65 + return httpSocket;
  66 + } else {
  67 + Group<isServer>::from(httpSocket)->httpDataHandler(httpSocket->outstandingResponsesTail, data, httpSocket->contentLength, 0);
  68 + data += httpSocket->contentLength;
  69 + length -= httpSocket->contentLength;
  70 + httpSocket->contentLength = 0;
  71 + }
  72 + }
  73 +
  74 + if (FORCE_SLOW_PATH || httpSocket->httpBuffer.length()) {
  75 + if (httpSocket->httpBuffer.length() + length > MAX_HEADER_BUFFER_SIZE) {
  76 + httpSocket->onEnd(httpSocket);
  77 + return httpSocket;
  78 + }
  79 +
  80 + httpSocket->httpBuffer.reserve(httpSocket->httpBuffer.length() + length + WebSocketProtocol<uWS::CLIENT, WebSocket<uWS::CLIENT>>::CONSUME_POST_PADDING);
  81 + httpSocket->httpBuffer.append(data, length);
  82 + data = (char *) httpSocket->httpBuffer.data();
  83 + length = httpSocket->httpBuffer.length();
  84 + }
  85 +
  86 + char *end = data + length;
  87 + char *cursor = data;
  88 + *end = '\r';
  89 + Header headers[MAX_HEADERS];
  90 + do {
  91 + char *lastCursor = cursor;
  92 + if ((cursor = getHeaders(cursor, end, headers, MAX_HEADERS))) {
  93 + HttpRequest req(headers);
  94 +
  95 + if (isServer) {
  96 + headers->valueLength = std::max<int>(0, headers->valueLength - 9);
  97 + httpSocket->missedDeadline = false;
  98 + if (req.getHeader("upgrade", 7)) {
  99 + if (Group<SERVER>::from(httpSocket)->httpUpgradeHandler) {
  100 + Group<SERVER>::from(httpSocket)->httpUpgradeHandler((HttpSocket<SERVER> *) httpSocket, req);
  101 + } else {
  102 + Header secKey = req.getHeader("sec-websocket-key", 17);
  103 + Header extensions = req.getHeader("sec-websocket-extensions", 24);
  104 + Header subprotocol = req.getHeader("sec-websocket-protocol", 22);
  105 + if (secKey.valueLength == 24) {
  106 + bool perMessageDeflate;
  107 + httpSocket->upgrade(secKey.value, extensions.value, extensions.valueLength,
  108 + subprotocol.value, subprotocol.valueLength, &perMessageDeflate);
  109 + Group<isServer>::from(httpSocket)->removeHttpSocket(httpSocket);
  110 +
  111 + // Warning: changes socket, needs to inform the stack of Poll address change!
  112 + WebSocket<isServer> *webSocket = new WebSocket<isServer>(perMessageDeflate, httpSocket);
  113 + webSocket->template setState<WebSocket<isServer>>();
  114 + webSocket->change(webSocket->nodeData->loop, webSocket, webSocket->setPoll(UV_READABLE));
  115 + Group<isServer>::from(webSocket)->addWebSocket(webSocket);
  116 +
  117 + webSocket->cork(true);
  118 + Group<isServer>::from(webSocket)->connectionHandler(webSocket, req);
  119 + // todo: should not uncork if closed!
  120 + webSocket->cork(false);
  121 + delete httpSocket;
  122 +
  123 + return webSocket;
  124 + } else {
  125 + httpSocket->onEnd(httpSocket);
  126 + }
  127 + }
  128 + return httpSocket;
  129 + } else {
  130 + if (Group<SERVER>::from(httpSocket)->httpRequestHandler) {
  131 +
  132 + HttpResponse *res = HttpResponse::allocateResponse(httpSocket);
  133 + if (httpSocket->outstandingResponsesTail) {
  134 + httpSocket->outstandingResponsesTail->next = res;
  135 + } else {
  136 + httpSocket->outstandingResponsesHead = res;
  137 + }
  138 + httpSocket->outstandingResponsesTail = res;
  139 +
  140 + Header contentLength;
  141 + if (req.getMethod() != HttpMethod::METHOD_GET && (contentLength = req.getHeader("content-length", 14))) {
  142 + httpSocket->contentLength = atoi(contentLength.value);
  143 + size_t bytesToRead = std::min<int>(httpSocket->contentLength, end - cursor);
  144 + Group<SERVER>::from(httpSocket)->httpRequestHandler(res, req, cursor, bytesToRead, httpSocket->contentLength -= bytesToRead);
  145 + cursor += bytesToRead;
  146 + } else {
  147 + Group<SERVER>::from(httpSocket)->httpRequestHandler(res, req, nullptr, 0, 0);
  148 + }
  149 +
  150 + if (httpSocket->isClosed() || httpSocket->isShuttingDown()) {
  151 + return httpSocket;
  152 + }
  153 + } else {
  154 + httpSocket->onEnd(httpSocket);
  155 + return httpSocket;
  156 + }
  157 + }
  158 + } else {
  159 + if (req.getHeader("upgrade", 7)) {
  160 +
  161 + // Warning: changes socket, needs to inform the stack of Poll address change!
  162 + WebSocket<isServer> *webSocket = new WebSocket<isServer>(false, httpSocket);
  163 + httpSocket->cancelTimeout();
  164 + webSocket->setUserData(httpSocket->httpUser);
  165 + webSocket->template setState<WebSocket<isServer>>();
  166 + webSocket->change(webSocket->nodeData->loop, webSocket, webSocket->setPoll(UV_READABLE));
  167 + Group<isServer>::from(webSocket)->addWebSocket(webSocket);
  168 +
  169 + webSocket->cork(true);
  170 + Group<isServer>::from(webSocket)->connectionHandler(webSocket, req);
  171 + if (!(webSocket->isClosed() || webSocket->isShuttingDown())) {
  172 + WebSocketProtocol<isServer, WebSocket<isServer>>::consume(cursor, end - cursor, webSocket);
  173 + }
  174 + webSocket->cork(false);
  175 + delete httpSocket;
  176 +
  177 + return webSocket;
  178 + } else {
  179 + httpSocket->onEnd(httpSocket);
  180 + }
  181 + return httpSocket;
  182 + }
  183 + } else {
  184 + if (!httpSocket->httpBuffer.length()) {
  185 + if (length > MAX_HEADER_BUFFER_SIZE) {
  186 + httpSocket->onEnd(httpSocket);
  187 + } else {
  188 + httpSocket->httpBuffer.append(lastCursor, end - lastCursor);
  189 + }
  190 + }
  191 + return httpSocket;
  192 + }
  193 + } while(cursor != end);
  194 +
  195 + httpSocket->cork(false);
  196 + httpSocket->httpBuffer.clear();
  197 +
  198 + return httpSocket;
  199 +}
  200 +
  201 +// todo: make this into a transformer and make use of sendTransformed
  202 +template <bool isServer>
  203 +void HttpSocket<isServer>::upgrade(const char *secKey, const char *extensions, size_t extensionsLength,
  204 + const char *subprotocol, size_t subprotocolLength, bool *perMessageDeflate) {
  205 +
  206 + Queue::Message *messagePtr;
  207 +
  208 + if (isServer) {
  209 + *perMessageDeflate = false;
  210 + std::string extensionsResponse;
  211 + if (extensionsLength) {
  212 + Group<isServer> *group = Group<isServer>::from(this);
  213 + ExtensionsNegotiator<uWS::SERVER> extensionsNegotiator(group->extensionOptions);
  214 + extensionsNegotiator.readOffer(std::string(extensions, extensionsLength));
  215 + extensionsResponse = extensionsNegotiator.generateOffer();
  216 + if (extensionsNegotiator.getNegotiatedOptions() & PERMESSAGE_DEFLATE) {
  217 + *perMessageDeflate = true;
  218 + }
  219 + }
  220 +
  221 + unsigned char shaInput[] = "XXXXXXXXXXXXXXXXXXXXXXXX258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
  222 + memcpy(shaInput, secKey, 24);
  223 + unsigned char shaDigest[SHA_DIGEST_LENGTH];
  224 + SHA1(shaInput, sizeof(shaInput) - 1, shaDigest);
  225 +
  226 + char upgradeBuffer[1024];
  227 + memcpy(upgradeBuffer, "HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: ", 97);
  228 + base64(shaDigest, upgradeBuffer + 97);
  229 + memcpy(upgradeBuffer + 125, "\r\n", 2);
  230 + size_t upgradeResponseLength = 127;
  231 + if (extensionsResponse.length() && extensionsResponse.length() < 200) {
  232 + memcpy(upgradeBuffer + upgradeResponseLength, "Sec-WebSocket-Extensions: ", 26);
  233 + memcpy(upgradeBuffer + upgradeResponseLength + 26, extensionsResponse.data(), extensionsResponse.length());
  234 + memcpy(upgradeBuffer + upgradeResponseLength + 26 + extensionsResponse.length(), "\r\n", 2);
  235 + upgradeResponseLength += 26 + extensionsResponse.length() + 2;
  236 + }
  237 + if (subprotocolLength && subprotocolLength < 200) {
  238 + memcpy(upgradeBuffer + upgradeResponseLength, "Sec-WebSocket-Protocol: ", 24);
  239 + memcpy(upgradeBuffer + upgradeResponseLength + 24, subprotocol, subprotocolLength);
  240 + memcpy(upgradeBuffer + upgradeResponseLength + 24 + subprotocolLength, "\r\n", 2);
  241 + upgradeResponseLength += 24 + subprotocolLength + 2;
  242 + }
  243 + static char stamp[] = "Sec-WebSocket-Version: 13\r\nWebSocket-Server: uWebSockets\r\n\r\n";
  244 + memcpy(upgradeBuffer + upgradeResponseLength, stamp, sizeof(stamp) - 1);
  245 + upgradeResponseLength += sizeof(stamp) - 1;
  246 +
  247 + messagePtr = allocMessage(upgradeResponseLength, upgradeBuffer);
  248 + } else {
  249 + messagePtr = allocMessage(httpBuffer.length(), httpBuffer.data());
  250 + httpBuffer.clear();
  251 + }
  252 +
  253 + bool wasTransferred;
  254 + if (write(messagePtr, wasTransferred)) {
  255 + if (!wasTransferred) {
  256 + freeMessage(messagePtr);
  257 + } else {
  258 + messagePtr->callback = nullptr;
  259 + }
  260 + } else {
  261 + freeMessage(messagePtr);
  262 + }
  263 +}
  264 +
  265 +template <bool isServer>
  266 +void HttpSocket<isServer>::onEnd(uS::Socket *s) {
  267 + HttpSocket<isServer> *httpSocket = (HttpSocket<isServer> *) s;
  268 +
  269 + if (!httpSocket->isShuttingDown()) {
  270 + if (isServer) {
  271 + Group<isServer>::from(httpSocket)->removeHttpSocket(httpSocket);
  272 + Group<isServer>::from(httpSocket)->httpDisconnectionHandler(httpSocket);
  273 + }
  274 + } else {
  275 + httpSocket->cancelTimeout();
  276 + }
  277 +
  278 + httpSocket->template closeSocket<HttpSocket<isServer>>();
  279 +
  280 + while (!httpSocket->messageQueue.empty()) {
  281 + Queue::Message *message = httpSocket->messageQueue.front();
  282 + if (message->callback) {
  283 + message->callback(nullptr, message->callbackData, true, nullptr);
  284 + }
  285 + httpSocket->messageQueue.pop();
  286 + }
  287 +
  288 + while (httpSocket->outstandingResponsesHead) {
  289 + Group<isServer>::from(httpSocket)->httpCancelledRequestHandler(httpSocket->outstandingResponsesHead);
  290 + HttpResponse *next = httpSocket->outstandingResponsesHead->next;
  291 + delete httpSocket->outstandingResponsesHead;
  292 + httpSocket->outstandingResponsesHead = next;
  293 + }
  294 +
  295 + if (httpSocket->preAllocatedResponse) {
  296 + delete httpSocket->preAllocatedResponse;
  297 + }
  298 +
  299 + httpSocket->nodeData->clearPendingPollChanges(httpSocket);
  300 +
  301 + if (!isServer) {
  302 + httpSocket->cancelTimeout();
  303 + Group<CLIENT>::from(httpSocket)->errorHandler(httpSocket->httpUser);
  304 + }
  305 +}
  306 +
  307 +template struct HttpSocket<SERVER>;
  308 +template struct HttpSocket<CLIENT>;
  309 +
  310 +}
  1 +#ifndef HTTPSOCKET_UWS_H
  2 +#define HTTPSOCKET_UWS_H
  3 +
  4 +#include "Socket.h"
  5 +#include <string>
  6 +// #include <experimental/string_view>
  7 +
  8 +namespace uWS {
  9 +
  10 +struct Header {
  11 + char *key, *value;
  12 + unsigned int keyLength, valueLength;
  13 +
  14 + operator bool() {
  15 + return key;
  16 + }
  17 +
  18 + // slow without string_view!
  19 + std::string toString() {
  20 + return std::string(value, valueLength);
  21 + }
  22 +};
  23 +
  24 +enum HttpMethod {
  25 + METHOD_GET,
  26 + METHOD_POST,
  27 + METHOD_PUT,
  28 + METHOD_DELETE,
  29 + METHOD_PATCH,
  30 + METHOD_OPTIONS,
  31 + METHOD_HEAD,
  32 + METHOD_TRACE,
  33 + METHOD_CONNECT,
  34 + METHOD_INVALID
  35 +};
  36 +
  37 +struct HttpRequest {
  38 + Header *headers;
  39 + Header getHeader(const char *key) {
  40 + return getHeader(key, strlen(key));
  41 + }
  42 +
  43 + HttpRequest(Header *headers = nullptr) : headers(headers) {}
  44 +
  45 + Header getHeader(const char *key, size_t length) {
  46 + if (headers) {
  47 + for (Header *h = headers; *++h; ) {
  48 + if (h->keyLength == length && !strncmp(h->key, key, length)) {
  49 + return *h;
  50 + }
  51 + }
  52 + }
  53 + return {nullptr, nullptr, 0, 0};
  54 + }
  55 +
  56 + Header getUrl() {
  57 + if (headers->key) {
  58 + return *headers;
  59 + }
  60 + return {nullptr, nullptr, 0, 0};
  61 + }
  62 +
  63 + HttpMethod getMethod() {
  64 + if (!headers->key) {
  65 + return METHOD_INVALID;
  66 + }
  67 + switch (headers->keyLength) {
  68 + case 3:
  69 + if (!strncmp(headers->key, "get", 3)) {
  70 + return METHOD_GET;
  71 + } else if (!strncmp(headers->key, "put", 3)) {
  72 + return METHOD_PUT;
  73 + }
  74 + break;
  75 + case 4:
  76 + if (!strncmp(headers->key, "post", 4)) {
  77 + return METHOD_POST;
  78 + } else if (!strncmp(headers->key, "head", 4)) {
  79 + return METHOD_HEAD;
  80 + }
  81 + break;
  82 + case 5:
  83 + if (!strncmp(headers->key, "patch", 5)) {
  84 + return METHOD_PATCH;
  85 + } else if (!strncmp(headers->key, "trace", 5)) {
  86 + return METHOD_TRACE;
  87 + }
  88 + break;
  89 + case 6:
  90 + if (!strncmp(headers->key, "delete", 6)) {
  91 + return METHOD_DELETE;
  92 + }
  93 + break;
  94 + case 7:
  95 + if (!strncmp(headers->key, "options", 7)) {
  96 + return METHOD_OPTIONS;
  97 + } else if (!strncmp(headers->key, "connect", 7)) {
  98 + return METHOD_CONNECT;
  99 + }
  100 + break;
  101 + }
  102 + return METHOD_INVALID;
  103 + }
  104 +};
  105 +
  106 +struct HttpResponse;
  107 +
  108 +template <const bool isServer>
  109 +struct WIN32_EXPORT HttpSocket : uS::Socket {
  110 + void *httpUser; // remove this later, setTimeout occupies user for now
  111 + HttpResponse *outstandingResponsesHead = nullptr;
  112 + HttpResponse *outstandingResponsesTail = nullptr;
  113 + HttpResponse *preAllocatedResponse = nullptr;
  114 +
  115 + std::string httpBuffer;
  116 + size_t contentLength = 0;
  117 + bool missedDeadline = false;
  118 +
  119 + HttpSocket(uS::Socket *socket) : uS::Socket(std::move(*socket)) {}
  120 +
  121 + void terminate() {
  122 + onEnd(this);
  123 + }
  124 +
  125 + void upgrade(const char *secKey, const char *extensions,
  126 + size_t extensionsLength, const char *subprotocol,
  127 + size_t subprotocolLength, bool *perMessageDeflate);
  128 +
  129 +private:
  130 + friend struct uS::Socket;
  131 + friend struct HttpResponse;
  132 + friend struct Hub;
  133 + static uS::Socket *onData(uS::Socket *s, char *data, size_t length);
  134 + static void onEnd(uS::Socket *s);
  135 +};
  136 +
  137 +struct HttpResponse {
  138 + HttpSocket<true> *httpSocket;
  139 + HttpResponse *next = nullptr;
  140 + void *userData = nullptr;
  141 + void *extraUserData = nullptr;
  142 + HttpSocket<true>::Queue::Message *messageQueue = nullptr;
  143 + bool hasEnded = false;
  144 + bool hasHead = false;
  145 +
  146 + HttpResponse(HttpSocket<true> *httpSocket) : httpSocket(httpSocket) {
  147 +
  148 + }
  149 +
  150 + template <bool isServer>
  151 + static HttpResponse *allocateResponse(HttpSocket<isServer> *httpSocket) {
  152 + if (httpSocket->preAllocatedResponse) {
  153 + HttpResponse *ret = httpSocket->preAllocatedResponse;
  154 + httpSocket->preAllocatedResponse = nullptr;
  155 + return ret;
  156 + } else {
  157 + return new HttpResponse((HttpSocket<true> *) httpSocket);
  158 + }
  159 + }
  160 +
  161 + //template <bool isServer>
  162 + void freeResponse(HttpSocket<true> *httpData) {
  163 + if (httpData->preAllocatedResponse) {
  164 + delete this;
  165 + } else {
  166 + httpData->preAllocatedResponse = this;
  167 + }
  168 + }
  169 +
  170 + void write(const char *message, size_t length = 0,
  171 + void(*callback)(void *httpSocket, void *data, bool cancelled, void *reserved) = nullptr,
  172 + void *callbackData = nullptr) {
  173 +
  174 + struct NoopTransformer {
  175 + static size_t estimate(const char *data, size_t length) {
  176 + return length;
  177 + }
  178 +
  179 + static size_t transform(const char *src, char *dst, size_t length, int transformData) {
  180 + memcpy(dst, src, length);
  181 + return length;
  182 + }
  183 + };
  184 +
  185 + httpSocket->sendTransformed<NoopTransformer>(message, length, callback, callbackData, 0);
  186 + hasHead = true;
  187 + }
  188 +
  189 + // todo: maybe this function should have a fast path for 0 length?
  190 + void end(const char *message = nullptr, size_t length = 0,
  191 + void(*callback)(void *httpResponse, void *data, bool cancelled, void *reserved) = nullptr,
  192 + void *callbackData = nullptr) {
  193 +
  194 + struct TransformData {
  195 + bool hasHead;
  196 + } transformData = {hasHead};
  197 +
  198 + struct HttpTransformer {
  199 +
  200 + // todo: this should get TransformData!
  201 + static size_t estimate(const char *data, size_t length) {
  202 + return length + 128;
  203 + }
  204 +
  205 + static size_t transform(const char *src, char *dst, size_t length, TransformData transformData) {
  206 + // todo: sprintf is extremely slow
  207 + int offset = transformData.hasHead ? 0 : std::sprintf(dst, "HTTP/1.1 200 OK\r\nContent-Length: %u\r\n\r\n", (unsigned int) length);
  208 + memcpy(dst + offset, src, length);
  209 + return length + offset;
  210 + }
  211 + };
  212 +
  213 + if (httpSocket->outstandingResponsesHead != this) {
  214 + HttpSocket<true>::Queue::Message *messagePtr = httpSocket->allocMessage(HttpTransformer::estimate(message, length));
  215 + messagePtr->length = HttpTransformer::transform(message, (char *) messagePtr->data, length, transformData);
  216 + messagePtr->callback = callback;
  217 + messagePtr->callbackData = callbackData;
  218 + messagePtr->nextMessage = messageQueue;
  219 + messageQueue = messagePtr;
  220 + hasEnded = true;
  221 + } else {
  222 + httpSocket->sendTransformed<HttpTransformer>(message, length, callback, callbackData, transformData);
  223 + // move head as far as possible
  224 + HttpResponse *head = next;
  225 + while (head) {
  226 + // empty message queue
  227 + HttpSocket<true>::Queue::Message *messagePtr = head->messageQueue;
  228 + while (messagePtr) {
  229 + HttpSocket<true>::Queue::Message *nextMessage = messagePtr->nextMessage;
  230 +
  231 + bool wasTransferred;
  232 + if (httpSocket->write(messagePtr, wasTransferred)) {
  233 + if (!wasTransferred) {
  234 + httpSocket->freeMessage(messagePtr);
  235 + if (callback) {
  236 + callback(this, callbackData, false, nullptr);
  237 + }
  238 + } else {
  239 + messagePtr->callback = callback;
  240 + messagePtr->callbackData = callbackData;
  241 + }
  242 + } else {
  243 + httpSocket->freeMessage(messagePtr);
  244 + if (callback) {
  245 + callback(this, callbackData, true, nullptr);
  246 + }
  247 + goto updateHead;
  248 + }
  249 + messagePtr = nextMessage;
  250 + }
  251 + // cannot go beyond unfinished responses
  252 + if (!head->hasEnded) {
  253 + break;
  254 + } else {
  255 + HttpResponse *next = head->next;
  256 + head->freeResponse(httpSocket);
  257 + head = next;
  258 + }
  259 + }
  260 + updateHead:
  261 + httpSocket->outstandingResponsesHead = head;
  262 + if (!head) {
  263 + httpSocket->outstandingResponsesTail = nullptr;
  264 + }
  265 +
  266 + freeResponse(httpSocket);
  267 + }
  268 + }
  269 +
  270 + void setUserData(void *userData) {
  271 + this->userData = userData;
  272 + }
  273 +
  274 + void *getUserData() {
  275 + return userData;
  276 + }
  277 +
  278 + HttpSocket<true> *getHttpSocket() {
  279 + return httpSocket;
  280 + }
  281 +};
  282 +
  283 +}
  284 +
  285 +#endif // HTTPSOCKET_UWS_H