付智勇

no message

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

要显示太多修改。

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

var Sequelize = require('sequelize');
//数据配置
var sequelize = new Sequelize('guest', 'root', "", {
var sequelize = new Sequelize('xuedianyun', 'root', "", {
host:'localhost',
dialect: 'mysql',
pool: {
... ...
... ... @@ -9,26 +9,26 @@ var userController =function (){
};
var sleep = function (time) {
return new Promise(function (resolve, reject) {
setTimeout(function () {
console.log(2)
resolve();
}, time);
})
};
userController.prototype.addUser = async(ctx, next) =>{
var user = {
id:uuid.db36(),
name:'555555',
age:11,
telephone:11112112,
password:saitMd5.md5AddSalt('123455').md5Pass
}
var params = ctx.request.body;
const pw = saitMd5.md5AddSalt(params.password)
if(!params.loginName){
return status.paramError('loginName');
}else if(!params.password){
return status.paramError('password',' 不能为空');
}
var user = {
loginName:params.loginName,
password:pw.md5Pass,
salt:pw.salt
}
try{
return await userService.addUser(user)
}catch (we){
return await userService.addUser(user)
}
}
module.exports = new userController();
\ No newline at end of file
... ...
var sequelize = require('../config');
var Sequelize = require('sequelize');
const uuid = require('../util/UuidUtil')
var user = sequelize.define('user', {
var user = sequelize.define('3m_user', {
id: {
type: Sequelize.STRING(36),
primaryKey: true
type: Sequelize.STRING(32),
defaultValue:uuid.db32(),
allowNull: false,
unique: true,
primaryKey: true,
field: "id"
},
loginName: {
allowNull: false,
type:Sequelize.STRING(100),
field: "login_name"
},
password: {
allowNull: false,
type:Sequelize.STRING(100),
field: "password"
},
salt:{
type:Sequelize.INTEGER(2),
field: "salt"
},
companyName:{
type:Sequelize.STRING(1024),
field: "company_name"
},
userName:{
type:Sequelize.STRING(64),
field: "user_name"
},
userType:{
type:Sequelize.INTEGER(1),
field: "user_type"
},
userRole:{
type:Sequelize.INTEGER(1),
field: "user_role"
},
userEmail:{
type:Sequelize.INTEGER(1),
field: "user_email"
},
userMobile:{
type:Sequelize.STRING(32),
field: "user_mobile"
},
createTime:{
type:Sequelize.DATE,
defaultValue:Sequelize.NOW,
field: "create_time"
},
endTime:{
type:Sequelize.DATE,
defaultValue:Sequelize.NOW,
field: "end_time"
},
content:{
type:Sequelize.TEXT(1024),
field: "content"
},
serialNo:{
type:Sequelize.INTEGER(11),
field: "serial_no"
},
siteId:{
type:Sequelize.STRING(32),
field: "site_id"
},
userStatus:{
type:Sequelize.INTEGER(11),
field: "user_status"
},
groupId:{
type:Sequelize.STRING(128),
field: "group_id"
},
name: Sequelize.STRING(100),
age: Sequelize.BIGINT(11),
telephone: Sequelize.BIGINT(11),
password:Sequelize.STRING(36)
}, {
timestamps: false,
freezeTableName: true
... ...
{
"_from": "co@^4.6.0",
"_args": [
[
{
"raw": "co",
"scope": null,
"escapedName": "co",
"name": "co",
"rawSpec": "",
"spec": "latest",
"type": "tag"
},
"/Users/fzy/project/koa2_Sequelize_project"
]
],
"_from": "co@latest",
"_id": "co@4.6.0",
"_inBundle": false,
"_integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
"_inCache": true,
"_location": "/co",
"_nodeVersion": "2.3.3",
"_npmUser": {
"name": "jongleberry",
"email": "jonathanrichardong@gmail.com"
},
"_npmVersion": "2.11.3",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "co@^4.6.0",
"name": "co",
"raw": "co",
"scope": null,
"escapedName": "co",
"rawSpec": "^4.6.0",
"saveSpec": null,
"fetchSpec": "^4.6.0"
"name": "co",
"rawSpec": "",
"spec": "latest",
"type": "tag"
},
"_requiredBy": [
"#USER",
"/koa-convert",
"/koa-send"
],
"_resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
"_shasum": "6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184",
"_spec": "co@^4.6.0",
"_where": "/Users/fzy/project/efang/node_modules/koa-convert",
"_shrinkwrap": null,
"_spec": "co",
"_where": "/Users/fzy/project/koa2_Sequelize_project",
"bugs": {
"url": "https://github.com/tj/co/issues"
},
"bundleDependencies": false,
"deprecated": false,
"dependencies": {},
"description": "generator async control flow goodness",
"devDependencies": {
"browserify": "^10.0.0",
... ... @@ -35,6 +54,11 @@
"mocha": "^2.0.0",
"mz": "^1.0.2"
},
"directories": {},
"dist": {
"shasum": "6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184",
"tarball": "https://registry.npmjs.org/co/-/co-4.6.0.tgz"
},
"engines": {
"iojs": ">= 1.0.0",
"node": ">= 0.12.0"
... ... @@ -42,6 +66,7 @@
"files": [
"index.js"
],
"gitHead": "b54d18f8f472ad1314800e786993c4169a5ff9f8",
"homepage": "https://github.com/tj/co#readme",
"keywords": [
"async",
... ... @@ -51,7 +76,24 @@
"coroutine"
],
"license": "MIT",
"maintainers": [
{
"name": "tjholowaychuk",
"email": "tj@vision-media.ca"
},
{
"name": "jonathanong",
"email": "jonathanrichardong@gmail.com"
},
{
"name": "jongleberry",
"email": "jonathanrichardong@gmail.com"
}
],
"name": "co",
"optionalDependencies": {},
"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",
"readmeFilename": "Readme.md",
"repository": {
"type": "git",
"url": "git+https://github.com/tj/co.git"
... ...
Copyright (c) 2016 Alex Hultman and contributors
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgement in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
... ...
## Usage
`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')`:
```javascript
var WebSocketServer = require('uws').Server;
var wss = new WebSocketServer({ port: 3000 });
function onMessage(message) {
console.log('received: ' + message);
}
wss.on('connection', function(ws) {
ws.on('message', onMessage);
ws.send('something');
});
```
##### Deviations from ws
There are some important incompatibilities with `ws` though, we aim to be ~90% compatible but will never implement behavior that is deemed too inefficient:
* 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`.
* `webSocket._socket` is not a `net.Socket`, it is just a getter function with very basic functionalities.
* `webSocket._socket.remote...` might fail, you need to cache it at connection.
* `webSocket` acts like an `EventEmitter` with one listener per event maximum.
* `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.
## Installation
[![](https://nodei.co/npm/uws.png)](https://www.npmjs.com/package/uws)
At installation `uws` will try to recompile itself using the system's C++11 compiler (GCC 4.8+, Clang 3.3, VC++ 2015+).
If this fails it will silently fall back to using the precompiled binaries.
NPM installation will never fail but `require('uws')` will throw if it cannot properly load the binary module.
... ...
{
'targets': [
{
'target_name': 'uws',
'sources': [
'src/Extensions.cpp',
'src/Group.cpp',
'src/Networking.cpp',
'src/Hub.cpp',
'src/Node.cpp',
'src/WebSocket.cpp',
'src/HTTPSocket.cpp',
'src/Socket.cpp',
'src/addon.cpp'
],
'conditions': [
['OS=="linux"', {
'cflags_cc': [ '-std=c++11', '-DUSE_LIBUV' ],
'cflags_cc!': [ '-fno-exceptions', '-std=gnu++0x', '-fno-rtti' ],
'cflags!': [ '-fno-omit-frame-pointer' ],
'ldflags!': [ '-rdynamic' ],
'ldflags': [ '-s' ]
}],
['OS=="mac"', {
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.7',
'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
'CLANG_CXX_LIBRARY': 'libc++',
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'GCC_THREADSAFE_STATICS': 'YES',
'GCC_OPTIMIZATION_LEVEL': '3',
'GCC_ENABLE_CPP_RTTI': 'YES',
'OTHER_CFLAGS!': [ '-fno-strict-aliasing' ],
'OTHER_CPLUSPLUSFLAGS': [ '-DUSE_LIBUV' ]
}
}],
['OS=="win"', {
'cflags_cc': [ '/DUSE_LIBUV' ],
'cflags_cc!': []
}]
]
},
{
'target_name': 'action_after_build',
'type': 'none',
'dependencies': [ 'uws' ],
'conditions': [
['OS!="win"', {
'actions': [
{
'action_name': 'move_lib',
'inputs': [
'<@(PRODUCT_DIR)/uws.node'
],
'outputs': [
'uws'
],
'action': ['cp', '<@(PRODUCT_DIR)/uws.node', 'uws_<!@(node -p process.platform)_<!@(node -p process.versions.modules).node']
}
]}
],
['OS=="win"', {
'actions': [
{
'action_name': 'move_lib',
'inputs': [
'<@(PRODUCT_DIR)/uws.node'
],
'outputs': [
'uws'
],
'action': ['copy', '<@(PRODUCT_DIR)/uws.node', 'uws_<!@(node -p process.platform)_<!@(node -p process.versions.modules).node']
}
]}
]
]
}
]
}
... ...
# We borrow heavily from the kernel build setup, though we are simpler since
# we don't have Kconfig tweaking settings on us.
# The implicit make rules have it looking for RCS files, among other things.
# We instead explicitly write all the rules we care about.
# It's even quicker (saves ~200ms) to pass -r on the command line.
MAKEFLAGS=-r
# The source directory tree.
srcdir := ..
abs_srcdir := $(abspath $(srcdir))
# The name of the builddir.
builddir_name ?= .
# The V=1 flag on command line makes us verbosely print command lines.
ifdef V
quiet=
else
quiet=quiet_
endif
# Specify BUILDTYPE=Release on the command line for a release build.
BUILDTYPE ?= Release
# Directory all our build output goes into.
# Note that this must be two directories beneath src/ for unit tests to pass,
# as they reach into the src/ directory for data with relative paths.
builddir ?= $(builddir_name)/$(BUILDTYPE)
abs_builddir := $(abspath $(builddir))
depsdir := $(builddir)/.deps
# Object output directory.
obj := $(builddir)/obj
abs_obj := $(abspath $(obj))
# We build up a list of every single one of the targets so we can slurp in the
# generated dependency rule Makefiles in one pass.
all_deps :=
CC.target ?= $(CC)
CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS)
CXX.target ?= $(CXX)
CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS)
LINK.target ?= $(LINK)
LDFLAGS.target ?= $(LDFLAGS)
AR.target ?= $(AR)
# C++ apps need to be linked with g++.
LINK ?= $(CXX.target)
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
# to replicate this environment fallback in make as well.
CC.host ?= gcc
CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host)
CXX.host ?= g++
CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
LINK.host ?= $(CXX.host)
LDFLAGS.host ?=
AR.host ?= ar
# Define a dir function that can handle spaces.
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
# "leading spaces cannot appear in the text of the first argument as written.
# These characters can be put into the argument value by variable substitution."
empty :=
space := $(empty) $(empty)
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
replace_spaces = $(subst $(space),?,$1)
unreplace_spaces = $(subst ?,$(space),$1)
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
# Flags to make gcc output dependency info. Note that you need to be
# careful here to use the flags that ccache and distcc can understand.
# We write to a dep file on the side first and then rename at the end
# so we can't end up with a broken dep file.
depfile = $(depsdir)/$(call replace_spaces,$@).d
DEPFLAGS = -MMD -MF $(depfile).raw
# We have to fixup the deps output in a few ways.
# (1) the file output should mention the proper .o file.
# ccache or distcc lose the path to the target, so we convert a rule of
# the form:
# foobar.o: DEP1 DEP2
# into
# path/to/foobar.o: DEP1 DEP2
# (2) we want missing files not to cause us to fail to build.
# We want to rewrite
# foobar.o: DEP1 DEP2 \
# DEP3
# to
# DEP1:
# DEP2:
# DEP3:
# so if the files are missing, they're just considered phony rules.
# We have to do some pretty insane escaping to get those backslashes
# and dollar signs past make, the shell, and sed at the same time.
# Doesn't work with spaces, but that's fine: .d files have spaces in
# their names replaced with other characters.
define fixup_dep
# The depfile may not exist if the input file didn't have any #includes.
touch $(depfile).raw
# Fixup path as in (1).
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
# Add extra rules as in (2).
# We remove slashes and replace spaces with new lines;
# remove blank lines;
# delete the first line and append a colon to the remaining lines.
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
grep -v '^$$' |\
sed -e 1d -e 's|$$|:|' \
>> $(depfile)
rm $(depfile).raw
endef
# Command definitions:
# - cmd_foo is the actual command to run;
# - quiet_cmd_foo is the brief-output summary of the command.
quiet_cmd_cc = CC($(TOOLSET)) $@
cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_cxx = CXX($(TOOLSET)) $@
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_objc = CXX($(TOOLSET)) $@
cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
quiet_cmd_objcxx = CXX($(TOOLSET)) $@
cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
# Commands for precompiled header files.
quiet_cmd_pch_c = CXX($(TOOLSET)) $@
cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_pch_cc = CXX($(TOOLSET)) $@
cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_pch_m = CXX($(TOOLSET)) $@
cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
quiet_cmd_pch_mm = CXX($(TOOLSET)) $@
cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
# gyp-mac-tool is written next to the root Makefile by gyp.
# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd
# already.
quiet_cmd_mac_tool = MACTOOL $(4) $<
cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@"
quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@
cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4)
quiet_cmd_infoplist = INFOPLIST $@
cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@"
quiet_cmd_touch = TOUCH $@
cmd_touch = touch $@
quiet_cmd_copy = COPY $@
# send stderr to /dev/null to ignore messages when linking directories.
cmd_copy = rm -rf "$@" && cp -af "$<" "$@"
quiet_cmd_alink = LIBTOOL-STATIC $@
cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
# Define an escape_quotes function to escape single quotes.
# This allows us to handle quotes properly as long as we always use
# use single quotes and escape_quotes.
escape_quotes = $(subst ','\'',$(1))
# This comment is here just to include a ' to unconfuse syntax highlighting.
# Define an escape_vars function to escape '$' variable syntax.
# This allows us to read/write command lines with shell variables (e.g.
# $LD_LIBRARY_PATH), without triggering make substitution.
escape_vars = $(subst $$,$$$$,$(1))
# Helper that expands to a shell command to echo a string exactly as it is in
# make. This uses printf instead of echo because printf's behaviour with respect
# to escape sequences is more portable than echo's across different shells
# (e.g., dash, bash).
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
# Helper to compare the command we're about to run against the command
# we logged the last time we ran the command. Produces an empty
# string (false) when the commands match.
# Tricky point: Make has no string-equality test function.
# The kernel uses the following, but it seems like it would have false
# positives, where one string reordered its arguments.
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
# $(filter-out $(cmd_$@), $(cmd_$(1))))
# We instead substitute each for the empty string into the other, and
# say they're equal if both substitutions produce the empty string.
# .d files contain ? instead of spaces, take that into account.
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
# Helper that is non-empty when a prerequisite changes.
# Normally make does this implicitly, but we force rules to always run
# so we can check their command lines.
# $? -- new prerequisites
# $| -- order-only dependencies
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
# Helper that executes all postbuilds until one fails.
define do_postbuilds
@E=0;\
for p in $(POSTBUILDS); do\
eval $$p;\
E=$$?;\
if [ $$E -ne 0 ]; then\
break;\
fi;\
done;\
if [ $$E -ne 0 ]; then\
rm -rf "$@";\
exit $$E;\
fi
endef
# do_cmd: run a command via the above cmd_foo names, if necessary.
# Should always run for a given target to handle command-line changes.
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
# Third argument, if non-zero, makes it do POSTBUILDS processing.
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
# spaces already and dirx strips the ? characters.
define do_cmd
$(if $(or $(command_changed),$(prereq_changed)),
@$(call exact_echo, $($(quiet)cmd_$(1)))
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
$(if $(findstring flock,$(word 2,$(cmd_$1))),
@$(cmd_$(1))
@echo " $(quiet_cmd_$(1)): Finished",
@$(cmd_$(1))
)
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
@$(if $(2),$(fixup_dep))
$(if $(and $(3), $(POSTBUILDS)),
$(call do_postbuilds)
)
)
endef
# Declare the "all" target first so it is the default,
# even though we don't have the deps yet.
.PHONY: all
all:
# make looks for ways to re-generate included makefiles, but in our case, we
# don't have a direct way. Explicitly telling make that it has nothing to do
# for them makes it go faster.
%.d: ;
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
# do_cmd.
.PHONY: FORCE_DO_CMD
FORCE_DO_CMD:
TOOLSET := target
# Suffix rules, putting all outputs into $(obj).
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.m FORCE_DO_CMD
@$(call do_cmd,objc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.mm FORCE_DO_CMD
@$(call do_cmd,objcxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
@$(call do_cmd,cc,1)
# Try building from generated source, too.
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.m FORCE_DO_CMD
@$(call do_cmd,objc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.mm FORCE_DO_CMD
@$(call do_cmd,objcxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.m FORCE_DO_CMD
@$(call do_cmd,objc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.mm FORCE_DO_CMD
@$(call do_cmd,objcxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
@$(call do_cmd,cc,1)
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
$(findstring $(join ^,$(prefix)),\
$(join ^,action_after_build.target.mk)))),)
include action_after_build.target.mk
endif
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
$(findstring $(join ^,$(prefix)),\
$(join ^,uws.target.mk)))),)
include uws.target.mk
endif
quiet_cmd_regen_makefile = ACTION Regenerating $@
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
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
$(call do_cmd,regen_makefile)
# "all" is a concatenation of the "all" targets from all the included
# sub-makefiles. This is just here to clarify.
all:
# Add in dependency-tracking rules. $(all_deps) is the list of every single
# target in our tree. Only consider the ones with .d (dependency) info:
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
ifneq ($(d_files),)
include $(d_files)
endif
... ...
cmd_Release/obj.target/action_after_build.stamp := touch Release/obj.target/action_after_build.stamp
... ...
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
Release/obj.target/uws/src/Extensions.o: ../src/Extensions.cpp \
../src/Extensions.h
../src/Extensions.cpp:
../src/Extensions.h:
... ...
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
Release/obj.target/uws/src/Group.o: ../src/Group.cpp ../src/Group.h \
../src/WebSocket.h ../src/WebSocketProtocol.h ../src/Networking.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h ../src/Socket.h \
../src/HTTPSocket.h ../src/Extensions.h ../src/Hub.h ../src/Node.h \
/Users/fzy/.node-gyp/8.2.1/include/node/zlib.h \
/Users/fzy/.node-gyp/8.2.1/include/node/zconf.h
../src/Group.cpp:
../src/Group.h:
../src/WebSocket.h:
../src/WebSocketProtocol.h:
../src/Networking.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
../src/Socket.h:
../src/HTTPSocket.h:
../src/Extensions.h:
../src/Hub.h:
../src/Node.h:
/Users/fzy/.node-gyp/8.2.1/include/node/zlib.h:
/Users/fzy/.node-gyp/8.2.1/include/node/zconf.h:
... ...
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
Release/obj.target/uws/src/HTTPSocket.o: ../src/HTTPSocket.cpp \
../src/HTTPSocket.h ../src/Socket.h ../src/Networking.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h ../src/Group.h \
../src/WebSocket.h ../src/WebSocketProtocol.h ../src/Extensions.h
../src/HTTPSocket.cpp:
../src/HTTPSocket.h:
../src/Socket.h:
../src/Networking.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
../src/Group.h:
../src/WebSocket.h:
../src/WebSocketProtocol.h:
../src/Extensions.h:
... ...
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
Release/obj.target/uws/src/Hub.o: ../src/Hub.cpp ../src/Hub.h \
../src/Group.h ../src/WebSocket.h ../src/WebSocketProtocol.h \
../src/Networking.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h ../src/Socket.h \
../src/HTTPSocket.h ../src/Extensions.h ../src/Node.h \
/Users/fzy/.node-gyp/8.2.1/include/node/zlib.h \
/Users/fzy/.node-gyp/8.2.1/include/node/zconf.h
../src/Hub.cpp:
../src/Hub.h:
../src/Group.h:
../src/WebSocket.h:
../src/WebSocketProtocol.h:
../src/Networking.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
../src/Socket.h:
../src/HTTPSocket.h:
../src/Extensions.h:
../src/Node.h:
/Users/fzy/.node-gyp/8.2.1/include/node/zlib.h:
/Users/fzy/.node-gyp/8.2.1/include/node/zconf.h:
... ...
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
Release/obj.target/uws/src/Networking.o: ../src/Networking.cpp \
../src/Networking.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h
../src/Networking.cpp:
../src/Networking.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
... ...
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
Release/obj.target/uws/src/Node.o: ../src/Node.cpp ../src/Node.h \
../src/Socket.h ../src/Networking.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h
../src/Node.cpp:
../src/Node.h:
../src/Socket.h:
../src/Networking.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
... ...
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
Release/obj.target/uws/src/Socket.o: ../src/Socket.cpp ../src/Socket.h \
../src/Networking.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h
../src/Socket.cpp:
../src/Socket.h:
../src/Networking.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
... ...
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
Release/obj.target/uws/src/WebSocket.o: ../src/WebSocket.cpp \
../src/WebSocket.h ../src/WebSocketProtocol.h ../src/Networking.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h ../src/Socket.h \
../src/Group.h ../src/HTTPSocket.h ../src/Extensions.h ../src/Hub.h \
../src/Node.h /Users/fzy/.node-gyp/8.2.1/include/node/zlib.h \
/Users/fzy/.node-gyp/8.2.1/include/node/zconf.h
../src/WebSocket.cpp:
../src/WebSocket.h:
../src/WebSocketProtocol.h:
../src/Networking.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
../src/Socket.h:
../src/Group.h:
../src/HTTPSocket.h:
../src/Extensions.h:
../src/Hub.h:
../src/Node.h:
/Users/fzy/.node-gyp/8.2.1/include/node/zlib.h:
/Users/fzy/.node-gyp/8.2.1/include/node/zconf.h:
... ...
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
Release/obj.target/uws/src/addon.o: ../src/addon.cpp ../src/../src/uWS.h \
../src/Hub.h ../src/Group.h ../src/WebSocket.h \
../src/WebSocketProtocol.h ../src/Networking.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h \
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h \
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h \
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h ../src/Socket.h \
../src/HTTPSocket.h ../src/Extensions.h ../src/Node.h \
/Users/fzy/.node-gyp/8.2.1/include/node/zlib.h \
/Users/fzy/.node-gyp/8.2.1/include/node/zconf.h ../src/addon.h \
/Users/fzy/.node-gyp/8.2.1/include/node/node.h \
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h \
/Users/fzy/.node-gyp/8.2.1/include/node/v8-version.h \
/Users/fzy/.node-gyp/8.2.1/include/node/v8config.h \
/Users/fzy/.node-gyp/8.2.1/include/node/node_version.h \
/Users/fzy/.node-gyp/8.2.1/include/node/node_buffer.h ../src/http.h
../src/addon.cpp:
../src/../src/uWS.h:
../src/Hub.h:
../src/Group.h:
../src/WebSocket.h:
../src/WebSocketProtocol.h:
../src/Networking.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-errno.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-version.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-unix.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-threadpool.h:
/Users/fzy/.node-gyp/8.2.1/include/node/uv-darwin.h:
/Users/fzy/.node-gyp/8.2.1/include/node/pthread-barrier.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/e_os2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/comp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/crypto.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/stack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/safestack.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ossl_typ.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/symhacks.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bio.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/buffer.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/evp.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/objects.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/obj_mac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/asn1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/bn.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ec.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ecdh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/rsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dsa.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dh.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/sha.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/x509_vfy.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/lhash.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pkcs7.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pem2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/hmac.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/kssl.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl2.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl3.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/tls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/dtls1.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/pqueue.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/ssl23.h:
/Users/fzy/.node-gyp/8.2.1/include/node/openssl/srtp.h:
../src/Socket.h:
../src/HTTPSocket.h:
../src/Extensions.h:
../src/Node.h:
/Users/fzy/.node-gyp/8.2.1/include/node/zlib.h:
/Users/fzy/.node-gyp/8.2.1/include/node/zconf.h:
../src/addon.h:
/Users/fzy/.node-gyp/8.2.1/include/node/node.h:
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:
/Users/fzy/.node-gyp/8.2.1/include/node/v8-version.h:
/Users/fzy/.node-gyp/8.2.1/include/node/v8config.h:
/Users/fzy/.node-gyp/8.2.1/include/node/node_version.h:
/Users/fzy/.node-gyp/8.2.1/include/node/node_buffer.h:
../src/http.h:
... ...
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
... ...
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
... ...
不能预览此文件类型
# This file is generated by gyp; do not edit.
TOOLSET := target
TARGET := action_after_build
### Rules for action "move_lib":
quiet_cmd_binding_gyp_action_after_build_target_move_lib = ACTION binding_gyp_action_after_build_target_move_lib $@
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
uws: obj := $(abs_obj)
uws: builddir := $(abs_builddir)
uws: export BUILT_FRAMEWORKS_DIR := ${abs_builddir}
uws: export BUILT_PRODUCTS_DIR := ${abs_builddir}
uws: export CONFIGURATION := ${BUILDTYPE}
uws: export PRODUCT_NAME := action_after_build
uws: export SDKROOT := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
uws: export SRCROOT := ${abs_srcdir}/
uws: export SOURCE_ROOT := ${SRCROOT}
uws: export TARGET_BUILD_DIR := ${abs_builddir}
uws: export TEMP_DIR := ${TMPDIR}
uws: TOOLSET := $(TOOLSET)
uws: $(builddir)/uws.node FORCE_DO_CMD
$(call do_cmd,binding_gyp_action_after_build_target_move_lib)
all_deps += uws
action_binding_gyp_action_after_build_target_move_lib_outputs := uws
### Rules for final target.
# Build our special outputs first.
$(obj).target/action_after_build.stamp: | $(action_binding_gyp_action_after_build_target_move_lib_outputs)
# Preserve order dependency of special output on deps.
$(action_binding_gyp_action_after_build_target_move_lib_outputs): | $(builddir)/uws.node
$(obj).target/action_after_build.stamp: TOOLSET := $(TOOLSET)
$(obj).target/action_after_build.stamp: $(builddir)/uws.node FORCE_DO_CMD
$(call do_cmd,touch)
all_deps += $(obj).target/action_after_build.stamp
# Add target alias
.PHONY: action_after_build
action_after_build: $(obj).target/action_after_build.stamp
# Add target alias to "all" target.
.PHONY: all
all: action_after_build
... ...
# This file is generated by gyp; do not edit.
export builddir_name ?= ./build/.
.PHONY: all
all:
$(MAKE) uws action_after_build
... ...
# Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": []
},
"variables": {
"asan": 0,
"coverage": "false",
"debug_devtools": "node",
"force_dynamic_crt": 0,
"host_arch": "x64",
"icu_data_file": "icudt59l.dat",
"icu_data_in": "../../deps/icu-small/source/data/in/icudt59l.dat",
"icu_endianness": "l",
"icu_gyp_path": "tools/icu/icu-generic.gyp",
"icu_locales": "en,root",
"icu_path": "deps/icu-small",
"icu_small": "true",
"icu_ver_major": "59",
"llvm_version": 0,
"node_byteorder": "little",
"node_enable_d8": "false",
"node_enable_v8_vtunejit": "false",
"node_install_npm": "true",
"node_module_version": 57,
"node_no_browser_globals": "false",
"node_prefix": "/",
"node_release_urlbase": "https://nodejs.org/download/release/",
"node_shared": "false",
"node_shared_cares": "false",
"node_shared_http_parser": "false",
"node_shared_libuv": "false",
"node_shared_openssl": "false",
"node_shared_zlib": "false",
"node_tag": "",
"node_use_bundled_v8": "true",
"node_use_dtrace": "true",
"node_use_etw": "false",
"node_use_lttng": "false",
"node_use_openssl": "true",
"node_use_perfctr": "false",
"node_use_v8_platform": "true",
"node_without_node_options": "false",
"openssl_fips": "",
"openssl_no_asm": 0,
"shlib_suffix": "57.dylib",
"target_arch": "x64",
"uv_parent_path": "/deps/uv/",
"uv_use_dtrace": "true",
"v8_enable_gdbjit": 0,
"v8_enable_i18n_support": 1,
"v8_enable_inspector": 1,
"v8_no_strict_aliasing": 1,
"v8_optimized_debug": 0,
"v8_promise_internal_field_count": 1,
"v8_random_seed": 0,
"v8_trace_maps": 0,
"v8_use_snapshot": "false",
"want_separate_host_toolset": 0,
"want_separate_host_toolset_mkpeephole": 0,
"xcode_version": "7.0",
"nodedir": "/Users/fzy/.node-gyp/8.2.1",
"copy_dev_lib": "true",
"standalone_static_library": 1,
"dry_run": "",
"legacy_bundling": "",
"save_dev": "",
"browser": "",
"only": "",
"viewer": "man",
"also": "",
"rollback": "true",
"usage": "",
"globalignorefile": "/usr/local/etc/npmignore",
"init_author_url": "",
"maxsockets": "50",
"shell": "/bin/zsh",
"metrics_registry": "https://registry.npmjs.org/",
"parseable": "",
"shrinkwrap": "true",
"init_license": "ISC",
"if_present": "",
"cache_max": "Infinity",
"init_author_email": "",
"sign_git_tag": "",
"cert": "",
"git_tag_version": "true",
"local_address": "",
"long": "",
"fetch_retries": "2",
"registry": "https://registry.npmjs.org/",
"key": "",
"message": "%s",
"versions": "",
"globalconfig": "/usr/local/etc/npmrc",
"always_auth": "",
"logs_max": "10",
"cache_lock_retries": "10",
"global_style": "",
"heading": "npm",
"fetch_retry_mintimeout": "10000",
"proprietary_attribs": "true",
"searchlimit": "20",
"access": "",
"json": "",
"description": "true",
"engine_strict": "",
"https_proxy": "",
"init_module": "/Users/fzy/.npm-init.js",
"userconfig": "/Users/fzy/.npmrc",
"node_version": "8.2.1",
"user": "501",
"auth_type": "legacy",
"editor": "vi",
"save": "",
"tag": "latest",
"global": "",
"progress": "true",
"ham_it_up": "",
"optional": "true",
"searchstaleness": "900",
"bin_links": "true",
"force": "",
"searchopts": "",
"depth": "Infinity",
"rebuild_bundle": "true",
"sso_poll_frequency": "500",
"unicode": "true",
"fetch_retry_maxtimeout": "60000",
"ca": "",
"save_prefix": "^",
"scripts_prepend_node_path": "warn-only",
"sso_type": "oauth",
"strict_ssl": "true",
"tag_version_prefix": "v",
"dev": "",
"fetch_retry_factor": "10",
"group": "20",
"save_exact": "",
"cache_lock_stale": "60000",
"version": "",
"cache_min": "10",
"cache": "/Users/fzy/.npm",
"searchexclude": "",
"color": "true",
"save_optional": "",
"user_agent": "npm/4.5.0 node/v8.2.1 darwin x64",
"ignore_scripts": "",
"cache_lock_wait": "10000",
"production": "",
"save_bundle": "",
"send_metrics": "",
"init_version": "1.0.0",
"umask": "0022",
"scope": "",
"git": "git",
"init_author_name": "",
"onload_script": "",
"tmp": "/var/folders/2t/7v3j57s51h3gp3q51fmz67qc0000gn/T",
"unsafe_perm": "true",
"prefix": "/usr/local",
"link": ""
}
}
... ...
#!/usr/bin/env python
# Generated by gyp. Do not edit.
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility functions to perform Xcode-style build steps.
These functions are executed via gyp-mac-tool when using the Makefile generator.
"""
import fcntl
import fnmatch
import glob
import json
import os
import plistlib
import re
import shutil
import string
import subprocess
import sys
import tempfile
def main(args):
executor = MacTool()
exit_code = executor.Dispatch(args)
if exit_code is not None:
sys.exit(exit_code)
class MacTool(object):
"""This class performs all the Mac tooling steps. The methods can either be
executed directly, or dispatched from an argument list."""
def Dispatch(self, args):
"""Dispatches a string command to a method."""
if len(args) < 1:
raise Exception("Not enough arguments")
method = "Exec%s" % self._CommandifyName(args[0])
return getattr(self, method)(*args[1:])
def _CommandifyName(self, name_string):
"""Transforms a tool name like copy-info-plist to CopyInfoPlist"""
return name_string.title().replace('-', '')
def ExecCopyBundleResource(self, source, dest, convert_to_binary):
"""Copies a resource file to the bundle/Resources directory, performing any
necessary compilation on each resource."""
extension = os.path.splitext(source)[1].lower()
if os.path.isdir(source):
# Copy tree.
# TODO(thakis): This copies file attributes like mtime, while the
# single-file branch below doesn't. This should probably be changed to
# be consistent with the single-file branch.
if os.path.exists(dest):
shutil.rmtree(dest)
shutil.copytree(source, dest)
elif extension == '.xib':
return self._CopyXIBFile(source, dest)
elif extension == '.storyboard':
return self._CopyXIBFile(source, dest)
elif extension == '.strings':
self._CopyStringsFile(source, dest, convert_to_binary)
else:
shutil.copy(source, dest)
def _CopyXIBFile(self, source, dest):
"""Compiles a XIB file with ibtool into a binary plist in the bundle."""
# ibtool sometimes crashes with relative paths. See crbug.com/314728.
base = os.path.dirname(os.path.realpath(__file__))
if os.path.relpath(source):
source = os.path.join(base, source)
if os.path.relpath(dest):
dest = os.path.join(base, dest)
args = ['xcrun', 'ibtool', '--errors', '--warnings', '--notices',
'--output-format', 'human-readable-text', '--compile', dest, source]
ibtool_section_re = re.compile(r'/\*.*\*/')
ibtool_re = re.compile(r'.*note:.*is clipping its content')
ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE)
current_section_header = None
for line in ibtoolout.stdout:
if ibtool_section_re.match(line):
current_section_header = line
elif not ibtool_re.match(line):
if current_section_header:
sys.stdout.write(current_section_header)
current_section_header = None
sys.stdout.write(line)
return ibtoolout.returncode
def _ConvertToBinary(self, dest):
subprocess.check_call([
'xcrun', 'plutil', '-convert', 'binary1', '-o', dest, dest])
def _CopyStringsFile(self, source, dest, convert_to_binary):
"""Copies a .strings file using iconv to reconvert the input into UTF-16."""
input_code = self._DetectInputEncoding(source) or "UTF-8"
# Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call
# CFPropertyListCreateFromXMLData() behind the scenes; at least it prints
# CFPropertyListCreateFromXMLData(): Old-style plist parser: missing
# semicolon in dictionary.
# on invalid files. Do the same kind of validation.
import CoreFoundation
s = open(source, 'rb').read()
d = CoreFoundation.CFDataCreate(None, s, len(s))
_, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None)
if error:
return
fp = open(dest, 'wb')
fp.write(s.decode(input_code).encode('UTF-16'))
fp.close()
if convert_to_binary == 'True':
self._ConvertToBinary(dest)
def _DetectInputEncoding(self, file_name):
"""Reads the first few bytes from file_name and tries to guess the text
encoding. Returns None as a guess if it can't detect it."""
fp = open(file_name, 'rb')
try:
header = fp.read(3)
except e:
fp.close()
return None
fp.close()
if header.startswith("\xFE\xFF"):
return "UTF-16"
elif header.startswith("\xFF\xFE"):
return "UTF-16"
elif header.startswith("\xEF\xBB\xBF"):
return "UTF-8"
else:
return None
def ExecCopyInfoPlist(self, source, dest, convert_to_binary, *keys):
"""Copies the |source| Info.plist to the destination directory |dest|."""
# Read the source Info.plist into memory.
fd = open(source, 'r')
lines = fd.read()
fd.close()
# Insert synthesized key/value pairs (e.g. BuildMachineOSBuild).
plist = plistlib.readPlistFromString(lines)
if keys:
plist = dict(plist.items() + json.loads(keys[0]).items())
lines = plistlib.writePlistToString(plist)
# Go through all the environment variables and replace them as variables in
# the file.
IDENT_RE = re.compile(r'[/\s]')
for key in os.environ:
if key.startswith('_'):
continue
evar = '${%s}' % key
evalue = os.environ[key]
lines = string.replace(lines, evar, evalue)
# Xcode supports various suffices on environment variables, which are
# all undocumented. :rfc1034identifier is used in the standard project
# template these days, and :identifier was used earlier. They are used to
# convert non-url characters into things that look like valid urls --
# except that the replacement character for :identifier, '_' isn't valid
# in a URL either -- oops, hence :rfc1034identifier was born.
evar = '${%s:identifier}' % key
evalue = IDENT_RE.sub('_', os.environ[key])
lines = string.replace(lines, evar, evalue)
evar = '${%s:rfc1034identifier}' % key
evalue = IDENT_RE.sub('-', os.environ[key])
lines = string.replace(lines, evar, evalue)
# Remove any keys with values that haven't been replaced.
lines = lines.split('\n')
for i in range(len(lines)):
if lines[i].strip().startswith("<string>${"):
lines[i] = None
lines[i - 1] = None
lines = '\n'.join(filter(lambda x: x is not None, lines))
# Write out the file with variables replaced.
fd = open(dest, 'w')
fd.write(lines)
fd.close()
# Now write out PkgInfo file now that the Info.plist file has been
# "compiled".
self._WritePkgInfo(dest)
if convert_to_binary == 'True':
self._ConvertToBinary(dest)
def _WritePkgInfo(self, info_plist):
"""This writes the PkgInfo file from the data stored in Info.plist."""
plist = plistlib.readPlist(info_plist)
if not plist:
return
# Only create PkgInfo for executable types.
package_type = plist['CFBundlePackageType']
if package_type != 'APPL':
return
# The format of PkgInfo is eight characters, representing the bundle type
# and bundle signature, each four characters. If that is missing, four
# '?' characters are used instead.
signature_code = plist.get('CFBundleSignature', '????')
if len(signature_code) != 4: # Wrong length resets everything, too.
signature_code = '?' * 4
dest = os.path.join(os.path.dirname(info_plist), 'PkgInfo')
fp = open(dest, 'w')
fp.write('%s%s' % (package_type, signature_code))
fp.close()
def ExecFlock(self, lockfile, *cmd_list):
"""Emulates the most basic behavior of Linux's flock(1)."""
# Rely on exception handling to report errors.
fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666)
fcntl.flock(fd, fcntl.LOCK_EX)
return subprocess.call(cmd_list)
def ExecFilterLibtool(self, *cmd_list):
"""Calls libtool and filters out '/path/to/libtool: file: foo.o has no
symbols'."""
libtool_re = re.compile(r'^.*libtool: file: .* has no symbols$')
libtool_re5 = re.compile(
r'^.*libtool: warning for library: ' +
r'.* the table of contents is empty ' +
r'\(no object file members in the library define global symbols\)$')
env = os.environ.copy()
# Ref:
# http://www.opensource.apple.com/source/cctools/cctools-809/misc/libtool.c
# The problem with this flag is that it resets the file mtime on the file to
# epoch=0, e.g. 1970-1-1 or 1969-12-31 depending on timezone.
env['ZERO_AR_DATE'] = '1'
libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE, env=env)
_, err = libtoolout.communicate()
for line in err.splitlines():
if not libtool_re.match(line) and not libtool_re5.match(line):
print >>sys.stderr, line
# Unconditionally touch the output .a file on the command line if present
# and the command succeeded. A bit hacky.
if not libtoolout.returncode:
for i in range(len(cmd_list) - 1):
if cmd_list[i] == "-o" and cmd_list[i+1].endswith('.a'):
os.utime(cmd_list[i+1], None)
break
return libtoolout.returncode
def ExecPackageFramework(self, framework, version):
"""Takes a path to Something.framework and the Current version of that and
sets up all the symlinks."""
# Find the name of the binary based on the part before the ".framework".
binary = os.path.basename(framework).split('.')[0]
CURRENT = 'Current'
RESOURCES = 'Resources'
VERSIONS = 'Versions'
if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)):
# Binary-less frameworks don't seem to contain symlinks (see e.g.
# chromium's out/Debug/org.chromium.Chromium.manifest/ bundle).
return
# Move into the framework directory to set the symlinks correctly.
pwd = os.getcwd()
os.chdir(framework)
# Set up the Current version.
self._Relink(version, os.path.join(VERSIONS, CURRENT))
# Set up the root symlinks.
self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary)
self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES)
# Back to where we were before!
os.chdir(pwd)
def _Relink(self, dest, link):
"""Creates a symlink to |dest| named |link|. If |link| already exists,
it is overwritten."""
if os.path.lexists(link):
os.remove(link)
os.symlink(dest, link)
def ExecCompileXcassets(self, keys, *inputs):
"""Compiles multiple .xcassets files into a single .car file.
This invokes 'actool' to compile all the inputs .xcassets files. The
|keys| arguments is a json-encoded dictionary of extra arguments to
pass to 'actool' when the asset catalogs contains an application icon
or a launch image.
Note that 'actool' does not create the Assets.car file if the asset
catalogs does not contains imageset.
"""
command_line = [
'xcrun', 'actool', '--output-format', 'human-readable-text',
'--compress-pngs', '--notices', '--warnings', '--errors',
]
is_iphone_target = 'IPHONEOS_DEPLOYMENT_TARGET' in os.environ
if is_iphone_target:
platform = os.environ['CONFIGURATION'].split('-')[-1]
if platform not in ('iphoneos', 'iphonesimulator'):
platform = 'iphonesimulator'
command_line.extend([
'--platform', platform, '--target-device', 'iphone',
'--target-device', 'ipad', '--minimum-deployment-target',
os.environ['IPHONEOS_DEPLOYMENT_TARGET'], '--compile',
os.path.abspath(os.environ['CONTENTS_FOLDER_PATH']),
])
else:
command_line.extend([
'--platform', 'macosx', '--target-device', 'mac',
'--minimum-deployment-target', os.environ['MACOSX_DEPLOYMENT_TARGET'],
'--compile',
os.path.abspath(os.environ['UNLOCALIZED_RESOURCES_FOLDER_PATH']),
])
if keys:
keys = json.loads(keys)
for key, value in keys.iteritems():
arg_name = '--' + key
if isinstance(value, bool):
if value:
command_line.append(arg_name)
elif isinstance(value, list):
for v in value:
command_line.append(arg_name)
command_line.append(str(v))
else:
command_line.append(arg_name)
command_line.append(str(value))
# Note: actool crashes if inputs path are relative, so use os.path.abspath
# to get absolute path name for inputs.
command_line.extend(map(os.path.abspath, inputs))
subprocess.check_call(command_line)
def ExecMergeInfoPlist(self, output, *inputs):
"""Merge multiple .plist files into a single .plist file."""
merged_plist = {}
for path in inputs:
plist = self._LoadPlistMaybeBinary(path)
self._MergePlist(merged_plist, plist)
plistlib.writePlist(merged_plist, output)
def ExecCodeSignBundle(self, key, resource_rules, entitlements, provisioning):
"""Code sign a bundle.
This function tries to code sign an iOS bundle, following the same
algorithm as Xcode:
1. copy ResourceRules.plist from the user or the SDK into the bundle,
2. pick the provisioning profile that best match the bundle identifier,
and copy it into the bundle as embedded.mobileprovision,
3. copy Entitlements.plist from user or SDK next to the bundle,
4. code sign the bundle.
"""
resource_rules_path = self._InstallResourceRules(resource_rules)
substitutions, overrides = self._InstallProvisioningProfile(
provisioning, self._GetCFBundleIdentifier())
entitlements_path = self._InstallEntitlements(
entitlements, substitutions, overrides)
subprocess.check_call([
'codesign', '--force', '--sign', key, '--resource-rules',
resource_rules_path, '--entitlements', entitlements_path,
os.path.join(
os.environ['TARGET_BUILD_DIR'],
os.environ['FULL_PRODUCT_NAME'])])
def _InstallResourceRules(self, resource_rules):
"""Installs ResourceRules.plist from user or SDK into the bundle.
Args:
resource_rules: string, optional, path to the ResourceRules.plist file
to use, default to "${SDKROOT}/ResourceRules.plist"
Returns:
Path to the copy of ResourceRules.plist into the bundle.
"""
source_path = resource_rules
target_path = os.path.join(
os.environ['BUILT_PRODUCTS_DIR'],
os.environ['CONTENTS_FOLDER_PATH'],
'ResourceRules.plist')
if not source_path:
source_path = os.path.join(
os.environ['SDKROOT'], 'ResourceRules.plist')
shutil.copy2(source_path, target_path)
return target_path
def _InstallProvisioningProfile(self, profile, bundle_identifier):
"""Installs embedded.mobileprovision into the bundle.
Args:
profile: string, optional, short name of the .mobileprovision file
to use, if empty or the file is missing, the best file installed
will be used
bundle_identifier: string, value of CFBundleIdentifier from Info.plist
Returns:
A tuple containing two dictionary: variables substitutions and values
to overrides when generating the entitlements file.
"""
source_path, provisioning_data, team_id = self._FindProvisioningProfile(
profile, bundle_identifier)
target_path = os.path.join(
os.environ['BUILT_PRODUCTS_DIR'],
os.environ['CONTENTS_FOLDER_PATH'],
'embedded.mobileprovision')
shutil.copy2(source_path, target_path)
substitutions = self._GetSubstitutions(bundle_identifier, team_id + '.')
return substitutions, provisioning_data['Entitlements']
def _FindProvisioningProfile(self, profile, bundle_identifier):
"""Finds the .mobileprovision file to use for signing the bundle.
Checks all the installed provisioning profiles (or if the user specified
the PROVISIONING_PROFILE variable, only consult it) and select the most
specific that correspond to the bundle identifier.
Args:
profile: string, optional, short name of the .mobileprovision file
to use, if empty or the file is missing, the best file installed
will be used
bundle_identifier: string, value of CFBundleIdentifier from Info.plist
Returns:
A tuple of the path to the selected provisioning profile, the data of
the embedded plist in the provisioning profile and the team identifier
to use for code signing.
Raises:
SystemExit: if no .mobileprovision can be used to sign the bundle.
"""
profiles_dir = os.path.join(
os.environ['HOME'], 'Library', 'MobileDevice', 'Provisioning Profiles')
if not os.path.isdir(profiles_dir):
print >>sys.stderr, (
'cannot find mobile provisioning for %s' % bundle_identifier)
sys.exit(1)
provisioning_profiles = None
if profile:
profile_path = os.path.join(profiles_dir, profile + '.mobileprovision')
if os.path.exists(profile_path):
provisioning_profiles = [profile_path]
if not provisioning_profiles:
provisioning_profiles = glob.glob(
os.path.join(profiles_dir, '*.mobileprovision'))
valid_provisioning_profiles = {}
for profile_path in provisioning_profiles:
profile_data = self._LoadProvisioningProfile(profile_path)
app_id_pattern = profile_data.get(
'Entitlements', {}).get('application-identifier', '')
for team_identifier in profile_data.get('TeamIdentifier', []):
app_id = '%s.%s' % (team_identifier, bundle_identifier)
if fnmatch.fnmatch(app_id, app_id_pattern):
valid_provisioning_profiles[app_id_pattern] = (
profile_path, profile_data, team_identifier)
if not valid_provisioning_profiles:
print >>sys.stderr, (
'cannot find mobile provisioning for %s' % bundle_identifier)
sys.exit(1)
# If the user has multiple provisioning profiles installed that can be
# used for ${bundle_identifier}, pick the most specific one (ie. the
# provisioning profile whose pattern is the longest).
selected_key = max(valid_provisioning_profiles, key=lambda v: len(v))
return valid_provisioning_profiles[selected_key]
def _LoadProvisioningProfile(self, profile_path):
"""Extracts the plist embedded in a provisioning profile.
Args:
profile_path: string, path to the .mobileprovision file
Returns:
Content of the plist embedded in the provisioning profile as a dictionary.
"""
with tempfile.NamedTemporaryFile() as temp:
subprocess.check_call([
'security', 'cms', '-D', '-i', profile_path, '-o', temp.name])
return self._LoadPlistMaybeBinary(temp.name)
def _MergePlist(self, merged_plist, plist):
"""Merge |plist| into |merged_plist|."""
for key, value in plist.iteritems():
if isinstance(value, dict):
merged_value = merged_plist.get(key, {})
if isinstance(merged_value, dict):
self._MergePlist(merged_value, value)
merged_plist[key] = merged_value
else:
merged_plist[key] = value
else:
merged_plist[key] = value
def _LoadPlistMaybeBinary(self, plist_path):
"""Loads into a memory a plist possibly encoded in binary format.
This is a wrapper around plistlib.readPlist that tries to convert the
plist to the XML format if it can't be parsed (assuming that it is in
the binary format).
Args:
plist_path: string, path to a plist file, in XML or binary format
Returns:
Content of the plist as a dictionary.
"""
try:
# First, try to read the file using plistlib that only supports XML,
# and if an exception is raised, convert a temporary copy to XML and
# load that copy.
return plistlib.readPlist(plist_path)
except:
pass
with tempfile.NamedTemporaryFile() as temp:
shutil.copy2(plist_path, temp.name)
subprocess.check_call(['plutil', '-convert', 'xml1', temp.name])
return plistlib.readPlist(temp.name)
def _GetSubstitutions(self, bundle_identifier, app_identifier_prefix):
"""Constructs a dictionary of variable substitutions for Entitlements.plist.
Args:
bundle_identifier: string, value of CFBundleIdentifier from Info.plist
app_identifier_prefix: string, value for AppIdentifierPrefix
Returns:
Dictionary of substitutions to apply when generating Entitlements.plist.
"""
return {
'CFBundleIdentifier': bundle_identifier,
'AppIdentifierPrefix': app_identifier_prefix,
}
def _GetCFBundleIdentifier(self):
"""Extracts CFBundleIdentifier value from Info.plist in the bundle.
Returns:
Value of CFBundleIdentifier in the Info.plist located in the bundle.
"""
info_plist_path = os.path.join(
os.environ['TARGET_BUILD_DIR'],
os.environ['INFOPLIST_PATH'])
info_plist_data = self._LoadPlistMaybeBinary(info_plist_path)
return info_plist_data['CFBundleIdentifier']
def _InstallEntitlements(self, entitlements, substitutions, overrides):
"""Generates and install the ${BundleName}.xcent entitlements file.
Expands variables "$(variable)" pattern in the source entitlements file,
add extra entitlements defined in the .mobileprovision file and the copy
the generated plist to "${BundlePath}.xcent".
Args:
entitlements: string, optional, path to the Entitlements.plist template
to use, defaults to "${SDKROOT}/Entitlements.plist"
substitutions: dictionary, variable substitutions
overrides: dictionary, values to add to the entitlements
Returns:
Path to the generated entitlements file.
"""
source_path = entitlements
target_path = os.path.join(
os.environ['BUILT_PRODUCTS_DIR'],
os.environ['PRODUCT_NAME'] + '.xcent')
if not source_path:
source_path = os.path.join(
os.environ['SDKROOT'],
'Entitlements.plist')
shutil.copy2(source_path, target_path)
data = self._LoadPlistMaybeBinary(target_path)
data = self._ExpandVariables(data, substitutions)
if overrides:
for key in overrides:
if key not in data:
data[key] = overrides[key]
plistlib.writePlist(data, target_path)
return target_path
def _ExpandVariables(self, data, substitutions):
"""Expands variables "$(variable)" in data.
Args:
data: object, can be either string, list or dictionary
substitutions: dictionary, variable substitutions to perform
Returns:
Copy of data where each references to "$(variable)" has been replaced
by the corresponding value found in substitutions, or left intact if
the key was not found.
"""
if isinstance(data, str):
for key, value in substitutions.iteritems():
data = data.replace('$(%s)' % key, value)
return data
if isinstance(data, list):
return [self._ExpandVariables(v, substitutions) for v in data]
if isinstance(data, dict):
return {k: self._ExpandVariables(data[k], substitutions) for k in data}
return data
if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))
... ...
# This file is generated by gyp; do not edit.
TOOLSET := target
TARGET := uws
DEFS_Debug := \
'-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' \
'-DDEBUG' \
'-D_DEBUG' \
'-DV8_ENABLE_CHECKS'
# Flags passed to all source files.
CFLAGS_Debug := \
-O0 \
-mmacosx-version-min=10.7 \
-arch x86_64 \
-Wall \
-Wendif-labels \
-W \
-Wno-unused-parameter
# Flags passed to only C files.
CFLAGS_C_Debug :=
# Flags passed to only C++ files.
CFLAGS_CC_Debug := \
-std=c++11 \
-stdlib=libc++ \
-DUSE_LIBUV
# Flags passed to only ObjC files.
CFLAGS_OBJC_Debug :=
# Flags passed to only ObjC++ files.
CFLAGS_OBJCC_Debug :=
INCS_Debug := \
-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
DEFS_Release := \
'-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'
# Flags passed to all source files.
CFLAGS_Release := \
-O3 \
-mmacosx-version-min=10.7 \
-arch x86_64 \
-Wall \
-Wendif-labels \
-W \
-Wno-unused-parameter
# Flags passed to only C files.
CFLAGS_C_Release :=
# Flags passed to only C++ files.
CFLAGS_CC_Release := \
-std=c++11 \
-stdlib=libc++ \
-DUSE_LIBUV
# Flags passed to only ObjC files.
CFLAGS_OBJC_Release :=
# Flags passed to only ObjC++ files.
CFLAGS_OBJCC_Release :=
INCS_Release := \
-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
OBJS := \
$(obj).target/$(TARGET)/src/Extensions.o \
$(obj).target/$(TARGET)/src/Group.o \
$(obj).target/$(TARGET)/src/Networking.o \
$(obj).target/$(TARGET)/src/Hub.o \
$(obj).target/$(TARGET)/src/Node.o \
$(obj).target/$(TARGET)/src/WebSocket.o \
$(obj).target/$(TARGET)/src/HTTPSocket.o \
$(obj).target/$(TARGET)/src/Socket.o \
$(obj).target/$(TARGET)/src/addon.o
# Add to the list of files we specially track dependencies for.
all_deps += $(OBJS)
# CFLAGS et al overrides must be target-local.
# See "Target-specific Variable Values" in the GNU Make manual.
$(OBJS): TOOLSET := $(TOOLSET)
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))
$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))
# Suffix rules, putting all outputs into $(obj).
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
# Try building from generated source, too.
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
# End of this set of suffix rules
### Rules for final target.
LDFLAGS_Debug := \
-undefined dynamic_lookup \
-Wl,-no_pie \
-Wl,-search_paths_first \
-mmacosx-version-min=10.7 \
-arch x86_64 \
-L$(builddir) \
-stdlib=libc++
LIBTOOLFLAGS_Debug := \
-undefined dynamic_lookup \
-Wl,-no_pie \
-Wl,-search_paths_first
LDFLAGS_Release := \
-undefined dynamic_lookup \
-Wl,-no_pie \
-Wl,-search_paths_first \
-mmacosx-version-min=10.7 \
-arch x86_64 \
-L$(builddir) \
-stdlib=libc++
LIBTOOLFLAGS_Release := \
-undefined dynamic_lookup \
-Wl,-no_pie \
-Wl,-search_paths_first
LIBS :=
$(builddir)/uws.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
$(builddir)/uws.node: LIBS := $(LIBS)
$(builddir)/uws.node: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE))
$(builddir)/uws.node: TOOLSET := $(TOOLSET)
$(builddir)/uws.node: $(OBJS) FORCE_DO_CMD
$(call do_cmd,solink_module)
all_deps += $(builddir)/uws.node
# Add target alias
.PHONY: uws
uws: $(builddir)/uws.node
# Short alias for building this executable.
.PHONY: uws.node
uws.node: $(builddir)/uws.node
# Add executable to "all" target.
.PHONY: all
all: $(builddir)/uws.node
... ...
CXX(target) Release/obj.target/uws/src/Extensions.o
./Release/.deps/Release/obj.target/uws/src/Extensions.o.d.raw Stats {
dev: 16777220,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 27524149,
size: 87,
blocks: 8,
atimeMs: 1503372419000,
mtimeMs: 1503372419000,
ctimeMs: 1503372419000,
birthtimeMs: 1503372418000,
atime: 2017-08-22T03:26:59.000Z,
mtime: 2017-08-22T03:26:59.000Z,
ctime: 2017-08-22T03:26:59.000Z,
birthtime: 2017-08-22T03:26:58.000Z }
CXX(target) Release/obj.target/uws/src/Group.o
./Release/.deps/Release/obj.target/uws/src/Group.o.d.raw Stats {
dev: 16777220,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 27524158,
size: 3185,
blocks: 8,
atimeMs: 1503372423000,
mtimeMs: 1503372423000,
ctimeMs: 1503372423000,
birthtimeMs: 1503372423000,
atime: 2017-08-22T03:27:03.000Z,
mtime: 2017-08-22T03:27:03.000Z,
ctime: 2017-08-22T03:27:03.000Z,
birthtime: 2017-08-22T03:27:03.000Z }
CXX(target) Release/obj.target/uws/src/Networking.o
./Release/.deps/Release/obj.target/uws/src/Networking.o.d.raw Stats {
dev: 16777220,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 27524161,
size: 2944,
blocks: 8,
atimeMs: 1503372424000,
mtimeMs: 1503372424000,
ctimeMs: 1503372424000,
birthtimeMs: 1503372424000,
atime: 2017-08-22T03:27:04.000Z,
mtime: 2017-08-22T03:27:04.000Z,
ctime: 2017-08-22T03:27:04.000Z,
birthtime: 2017-08-22T03:27:04.000Z }
CXX(target) Release/obj.target/uws/src/Hub.o
./Release/.deps/Release/obj.target/uws/src/Hub.o.d.raw Stats {
dev: 16777220,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 27524164,
size: 3185,
blocks: 8,
atimeMs: 1503372425000,
mtimeMs: 1503372425000,
ctimeMs: 1503372425000,
birthtimeMs: 1503372425000,
atime: 2017-08-22T03:27:05.000Z,
mtime: 2017-08-22T03:27:05.000Z,
ctime: 2017-08-22T03:27:05.000Z,
birthtime: 2017-08-22T03:27:05.000Z }
CXX(target) Release/obj.target/uws/src/Node.o
./Release/.deps/Release/obj.target/uws/src/Node.o.d.raw Stats {
dev: 16777220,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 27524168,
size: 2962,
blocks: 8,
atimeMs: 1503372426000,
mtimeMs: 1503372426000,
ctimeMs: 1503372426000,
birthtimeMs: 1503372426000,
atime: 2017-08-22T03:27:06.000Z,
mtime: 2017-08-22T03:27:06.000Z,
ctime: 2017-08-22T03:27:06.000Z,
birthtime: 2017-08-22T03:27:06.000Z }
CXX(target) Release/obj.target/uws/src/WebSocket.o
./Release/.deps/Release/obj.target/uws/src/WebSocket.o.d.raw Stats {
dev: 16777220,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 27524182,
size: 3193,
blocks: 8,
atimeMs: 1503372428000,
mtimeMs: 1503372428000,
ctimeMs: 1503372428000,
birthtimeMs: 1503372427000,
atime: 2017-08-22T03:27:08.000Z,
mtime: 2017-08-22T03:27:08.000Z,
ctime: 2017-08-22T03:27:08.000Z,
birthtime: 2017-08-22T03:27:07.000Z }
CXX(target) Release/obj.target/uws/src/HTTPSocket.o
./Release/.deps/Release/obj.target/uws/src/HTTPSocket.o.d.raw Stats {
dev: 16777220,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 27524200,
size: 3065,
blocks: 8,
atimeMs: 1503372429000,
mtimeMs: 1503372429000,
ctimeMs: 1503372429000,
birthtimeMs: 1503372429000,
atime: 2017-08-22T03:27:09.000Z,
mtime: 2017-08-22T03:27:09.000Z,
ctime: 2017-08-22T03:27:09.000Z,
birthtime: 2017-08-22T03:27:09.000Z }
CXX(target) Release/obj.target/uws/src/Socket.o
./Release/.deps/Release/obj.target/uws/src/Socket.o.d.raw Stats {
dev: 16777220,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 27524203,
size: 2952,
blocks: 8,
atimeMs: 1503372430000,
mtimeMs: 1503372430000,
ctimeMs: 1503372430000,
birthtimeMs: 1503372430000,
atime: 2017-08-22T03:27:10.000Z,
mtime: 2017-08-22T03:27:10.000Z,
ctime: 2017-08-22T03:27:10.000Z,
birthtime: 2017-08-22T03:27:10.000Z }
CXX(target) Release/obj.target/uws/src/addon.o
In file included from ../src/addon.cpp:3:
../src/http.h:31:55: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) header.value, String::kNormalString, header.valueLength));
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/addon.cpp:3:
../src/http.h:45:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "GET", String::kNormalString, 3));
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/addon.cpp:3:
../src/http.h:48:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "PUT", String::kNormalString, 3));
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/addon.cpp:3:
../src/http.h:51:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "POST", String::kNormalString, 4));
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/addon.cpp:3:
../src/http.h:54:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "HEAD", String::kNormalString, 4));
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/addon.cpp:3:
../src/http.h:57:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "PATCH", String::kNormalString, 5));
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/addon.cpp:3:
../src/http.h:60:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "TRACE", String::kNormalString, 5));
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/addon.cpp:3:
../src/http.h:63:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "DELETE", String::kNormalString, 6));
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/addon.cpp:3:
../src/http.h:66:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "OPTIONS", String::kNormalString, 7));
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/addon.cpp:3:
../src/http.h:69:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "CONNECT", String::kNormalString, 7));
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/addon.cpp:3:
../src/http.h:99:77: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
Local<Object> reqObjectLocal = reqTemplateLocal->GetFunction()->NewInstance();
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:3674:52: note: 'NewInstance' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
^
In file included from ../src/addon.cpp:3:
../src/http.h:149:39: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < headers->Length(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~
../src/http.h:196:53: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
return resTemplateLocal->GetFunction()->NewInstance();
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:3674:52: note: 'NewInstance' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
^
In file included from ../src/addon.cpp:3:
../src/http.h:227:52: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
reqObject->SetInternalField(4, String::NewFromOneByte(isolate, (uint8_t *) req.getUrl().value, String::kNormalString, req.getUrl().valueLength));
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:2539:21: note: 'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/addon.cpp:3:
../src/http.h:293:110: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(newInstance = Local<Function>::New(args.GetIsolate(), httpPersistent)->NewInstance());
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:3674:52: note: 'NewInstance' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
^
In file included from ../src/addon.cpp:3:
../src/http.h:320:80: warning: 'SetPrototype' is deprecated [-Wdeprecated-declarations]
express->Get(String::NewFromUtf8(isolate, "request"))->ToObject()->SetPrototype(Local<Object>::New(args.GetIsolate(), reqTemplate)->GetPrototype());
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:3095:43: note: 'SetPrototype' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", bool SetPrototype(Local<Value> prototype));
^
In file included from ../src/addon.cpp:3:
../src/http.h:321:81: warning: 'SetPrototype' is deprecated [-Wdeprecated-declarations]
express->Get(String::NewFromUtf8(isolate, "response"))->ToObject()->SetPrototype(Local<Object>::New(args.GetIsolate(), resTemplate)->GetPrototype());
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:3095:43: note: 'SetPrototype' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", bool SetPrototype(Local<Value> prototype));
^
In file included from ../src/addon.cpp:3:
../src/http.h:327:48: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(express->NewInstance());
^
/Users/fzy/.node-gyp/8.2.1/include/node/v8.h:3674:52: note: 'NewInstance' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
^
18 warnings generated.
./Release/.deps/Release/obj.target/uws/src/addon.o.d.raw Stats {
dev: 16777220,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 27524207,
size: 3567,
blocks: 8,
atimeMs: 1503372432000,
mtimeMs: 1503372432000,
ctimeMs: 1503372432000,
birthtimeMs: 1503372432000,
atime: 2017-08-22T03:27:12.000Z,
mtime: 2017-08-22T03:27:12.000Z,
ctime: 2017-08-22T03:27:12.000Z,
birthtime: 2017-08-22T03:27:12.000Z }
SOLINK_MODULE(target) Release/uws.node
ACTION binding_gyp_action_after_build_target_move_lib uws
TOUCH Release/obj.target/action_after_build.stamp
Release/obj.target/action_after_build.stamp Stats {
dev: 16777220,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 27524213,
size: 0,
blocks: 0,
atimeMs: 1503372433000,
mtimeMs: 1503372433000,
ctimeMs: 1503372433000,
birthtimeMs: 1503372433000,
atime: 2017-08-22T03:27:13.000Z,
mtime: 2017-08-22T03:27:13.000Z,
ctime: 2017-08-22T03:27:13.000Z,
birthtime: 2017-08-22T03:27:13.000Z }
... ...
{
"_args": [
[
{
"raw": "uws@~0.14.4",
"scope": null,
"escapedName": "uws",
"name": "uws",
"rawSpec": "~0.14.4",
"spec": ">=0.14.4 <0.15.0",
"type": "range"
},
"/Users/fzy/project/koa2_Sequelize_project/node_modules/engine.io"
]
],
"_from": "uws@>=0.14.4 <0.15.0",
"_id": "uws@0.14.5",
"_inCache": true,
"_location": "/uws",
"_nodeVersion": "5.11.0",
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs.com",
"tmp": "tmp/uws-0.14.5.tgz_1493399064525_0.939868062036112"
},
"_npmUser": {
"name": "alexhultman",
"email": "alexhultman@gmail.com"
},
"_npmVersion": "3.8.6",
"_phantomChildren": {},
"_requested": {
"raw": "uws@~0.14.4",
"scope": null,
"escapedName": "uws",
"name": "uws",
"rawSpec": "~0.14.4",
"spec": ">=0.14.4 <0.15.0",
"type": "range"
},
"_requiredBy": [
"/engine.io"
],
"_resolved": "https://registry.npmjs.org/uws/-/uws-0.14.5.tgz",
"_shasum": "67aaf33c46b2a587a5f6666d00f7691328f149dc",
"_shrinkwrap": null,
"_spec": "uws@~0.14.4",
"_where": "/Users/fzy/project/koa2_Sequelize_project/node_modules/engine.io",
"author": {
"name": "Alex Hultman",
"email": "alexhultman@gmail.com",
"url": "https://github.com/alexhultman"
},
"bugs": {
"url": "https://github.com/uWebSockets/uWebSockets/issues"
},
"dependencies": {},
"description": "Tiny WebSockets",
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "67aaf33c46b2a587a5f6666d00f7691328f149dc",
"tarball": "https://registry.npmjs.org/uws/-/uws-0.14.5.tgz"
},
"engines": {
"node": ">=4"
},
"homepage": "https://github.com/uWebSockets/uWebSockets",
"keywords": [
"tiny",
"websockets"
],
"license": "Zlib",
"main": "uws.js",
"maintainers": [
{
"name": "alexhultman",
"email": "alexhultman@gmail.com"
}
],
"name": "uws",
"optionalDependencies": {},
"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",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/uWebSockets/uWebSockets.git"
},
"scripts": {
"install": "node-gyp rebuild > build_log.txt 2>&1 || exit 0"
},
"version": "0.14.5"
}
... ...
#ifndef ASIO_H
#define ASIO_H
#include <boost/asio.hpp>
typedef boost::asio::ip::tcp::socket::native_type uv_os_sock_t;
static const int UV_READABLE = 1;
static const int UV_WRITABLE = 2;
struct Loop : boost::asio::io_service {
static Loop *createLoop(bool defaultLoop = true) {
return new Loop;
}
void destroy() {
delete this;
}
void run() {
boost::asio::io_service::run();
}
};
struct Timer {
boost::asio::deadline_timer asio_timer;
void *data;
Timer(Loop *loop) : asio_timer(*loop) {
}
void start(void (*cb)(Timer *), int first, int repeat) {
asio_timer.expires_from_now(boost::posix_time::milliseconds(first));
asio_timer.async_wait([this, cb, repeat](const boost::system::error_code &ec) {
if (ec != boost::asio::error::operation_aborted) {
if (repeat) {
start(cb, repeat, repeat);
}
cb(this);
}
});
}
void setData(void *data) {
this->data = data;
}
void *getData() {
return data;
}
// bug: cancel does not cancel expired timers!
// it has to guarantee that the timer is not called after
// stop is called! ffs boost!
void stop() {
asio_timer.cancel();
}
void close() {
asio_timer.get_io_service().post([this]() {
delete this;
});
}
};
struct Async {
Loop *loop;
void (*cb)(Async *);
void *data;
boost::asio::io_service::work asio_work;
Async(Loop *loop) : loop(loop), asio_work(*loop) {
}
void start(void (*cb)(Async *)) {
this->cb = cb;
}
void send() {
loop->post([this]() {
cb(this);
});
}
void close() {
loop->post([this]() {
delete this;
});
}
void setData(void *data) {
this->data = data;
}
void *getData() {
return data;
}
};
struct Poll {
boost::asio::posix::stream_descriptor *socket;
void (*cb)(Poll *p, int status, int events);
Poll(Loop *loop, uv_os_sock_t fd) {
socket = new boost::asio::posix::stream_descriptor(*loop, fd);
socket->non_blocking(true);
}
bool isClosed() {
return !socket;
}
boost::asio::ip::tcp::socket::native_type getFd() {
return socket ? socket->native_handle() : -1;
}
void setCb(void (*cb)(Poll *p, int status, int events)) {
this->cb = cb;
}
void (*getCb())(Poll *, int, int) {
return cb;
}
void reInit(Loop *loop, uv_os_sock_t fd) {
delete socket;
socket = new boost::asio::posix::stream_descriptor(*loop, fd);
socket->non_blocking(true);
}
void start(Loop *, Poll *self, int events) {
if (events & UV_READABLE) {
socket->async_read_some(boost::asio::null_buffers(), [self](boost::system::error_code ec, std::size_t) {
if (ec != boost::asio::error::operation_aborted) {
self->start(nullptr, self, UV_READABLE);
self->cb(self, ec ? -1 : 0, UV_READABLE);
}
});
}
if (events & UV_WRITABLE) {
socket->async_write_some(boost::asio::null_buffers(), [self](boost::system::error_code ec, std::size_t) {
if (ec != boost::asio::error::operation_aborted) {
self->start(nullptr, self, UV_WRITABLE);
self->cb(self, ec ? -1 : 0, UV_WRITABLE);
}
});
}
}
void change(Loop *, Poll *self, int events) {
socket->cancel();
start(nullptr, self, events);
}
bool fastTransfer(Loop *loop, Loop *newLoop, int events) {
return false;
}
// todo: asio is thread safe, use it!
bool threadSafeChange(Loop *loop, Poll *self, int events) {
return false;
}
void stop(Loop *) {
socket->cancel();
}
// this is not correct, but it works for now
// think about transfer - should allow one to not delete
// but in this case it doesn't matter at all
void close(Loop *loop, void (*cb)(Poll *)) {
socket->release();
socket->get_io_service().post([cb, this]() {
cb(this);
});
delete socket;
socket = nullptr;
}
};
#endif // ASIO_H
... ...
#ifndef BACKEND_H
#define BACKEND_H
// Default to Epoll if nothing specified and on Linux
// Default to Libuv if nothing specified and not on Linux
#ifdef USE_ASIO
#include "Asio.h"
#elif !defined(__linux__) || defined(USE_LIBUV)
#include "Libuv.h"
#else
#define USE_EPOLL
#include "Epoll.h"
#endif
#endif // BACKEND_H
... ...
#include "Backend.h"
#ifdef USE_EPOLL
// todo: remove this mutex, have callbacks set at program start
std::recursive_mutex cbMutex;
void (*callbacks[16])(Poll *, int, int);
int cbHead = 0;
void Loop::run() {
timepoint = std::chrono::system_clock::now();
while (numPolls) {
for (std::pair<Poll *, void (*)(Poll *)> c : closing) {
numPolls--;
c.second(c.first);
if (!numPolls) {
closing.clear();
return;
}
}
closing.clear();
int numFdReady = epoll_wait(epfd, readyEvents, 1024, delay);
timepoint = std::chrono::system_clock::now();
if (preCb) {
preCb(preCbData);
}
for (int i = 0; i < numFdReady; i++) {
Poll *poll = (Poll *) readyEvents[i].data.ptr;
int status = -bool(readyEvents[i].events & EPOLLERR);
callbacks[poll->state.cbIndex](poll, status, readyEvents[i].events);
}
while (timers.size() && timers[0].timepoint < timepoint) {
Timer *timer = timers[0].timer;
cancelledLastTimer = false;
timers[0].cb(timers[0].timer);
if (cancelledLastTimer) {
continue;
}
int repeat = timers[0].nextDelay;
auto cb = timers[0].cb;
timers.erase(timers.begin());
if (repeat) {
timer->start(cb, repeat, repeat);
}
}
if (postCb) {
postCb(postCbData);
}
}
}
#endif
... ...
#ifndef EPOLL_H
#define EPOLL_H
#include <sys/epoll.h>
#include <sys/eventfd.h>
#include <unistd.h>
#include <fcntl.h>
#include <chrono>
#include <algorithm>
#include <vector>
#include <mutex>
typedef int uv_os_sock_t;
static const int UV_READABLE = EPOLLIN;
static const int UV_WRITABLE = EPOLLOUT;
struct Poll;
struct Timer;
extern std::recursive_mutex cbMutex;
extern void (*callbacks[16])(Poll *, int, int);
extern int cbHead;
struct Timepoint {
void (*cb)(Timer *);
Timer *timer;
std::chrono::system_clock::time_point timepoint;
int nextDelay;
};
struct Loop {
int epfd;
int numPolls = 0;
bool cancelledLastTimer;
int delay = -1;
epoll_event readyEvents[1024];
std::chrono::system_clock::time_point timepoint;
std::vector<Timepoint> timers;
std::vector<std::pair<Poll *, void (*)(Poll *)>> closing;
void (*preCb)(void *) = nullptr;
void (*postCb)(void *) = nullptr;
void *preCbData, *postCbData;
Loop(bool defaultLoop) {
epfd = epoll_create1(EPOLL_CLOEXEC);
timepoint = std::chrono::system_clock::now();
}
static Loop *createLoop(bool defaultLoop = true) {
return new Loop(defaultLoop);
}
void destroy() {
::close(epfd);
delete this;
}
void run();
int getEpollFd() {
return epfd;
}
};
struct Timer {
Loop *loop;
void *data;
Timer(Loop *loop) {
this->loop = loop;
}
void start(void (*cb)(Timer *), int timeout, int repeat) {
loop->timepoint = std::chrono::system_clock::now();
std::chrono::system_clock::time_point timepoint = loop->timepoint + std::chrono::milliseconds(timeout);
Timepoint t = {cb, this, timepoint, repeat};
loop->timers.insert(
std::upper_bound(loop->timers.begin(), loop->timers.end(), t, [](const Timepoint &a, const Timepoint &b) {
return a.timepoint < b.timepoint;
}),
t
);
loop->delay = -1;
if (loop->timers.size()) {
loop->delay = std::max<int>(std::chrono::duration_cast<std::chrono::milliseconds>(loop->timers[0].timepoint - loop->timepoint).count(), 0);
}
}
void setData(void *data) {
this->data = data;
}
void *getData() {
return data;
}
// always called before destructor
void stop() {
auto pos = loop->timers.begin();
for (Timepoint &t : loop->timers) {
if (t.timer == this) {
loop->timers.erase(pos);
break;
}
pos++;
}
loop->cancelledLastTimer = true;
loop->delay = -1;
if (loop->timers.size()) {
loop->delay = std::max<int>(std::chrono::duration_cast<std::chrono::milliseconds>(loop->timers[0].timepoint - loop->timepoint).count(), 0);
}
}
void close() {
delete this;
}
};
// 4 bytes
struct Poll {
protected:
struct {
int fd : 28;
unsigned int cbIndex : 4;
} state = {-1, 0};
Poll(Loop *loop, uv_os_sock_t fd) {
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
state.fd = fd;
loop->numPolls++;
}
// todo: pre-set all of callbacks up front and remove mutex
void setCb(void (*cb)(Poll *p, int status, int events)) {
cbMutex.lock();
state.cbIndex = cbHead;
for (int i = 0; i < cbHead; i++) {
if (callbacks[i] == cb) {
state.cbIndex = i;
break;
}
}
if (state.cbIndex == cbHead) {
callbacks[cbHead++] = cb;
}
cbMutex.unlock();
}
void (*getCb())(Poll *, int, int) {
return callbacks[state.cbIndex];
}
void reInit(Loop *loop, uv_os_sock_t fd) {
state.fd = fd;
loop->numPolls++;
}
void start(Loop *loop, Poll *self, int events) {
epoll_event event;
event.events = events;
event.data.ptr = self;
epoll_ctl(loop->epfd, EPOLL_CTL_ADD, state.fd, &event);
}
void change(Loop *loop, Poll *self, int events) {
epoll_event event;
event.events = events;
event.data.ptr = self;
epoll_ctl(loop->epfd, EPOLL_CTL_MOD, state.fd, &event);
}
void stop(Loop *loop) {
epoll_event event;
epoll_ctl(loop->epfd, EPOLL_CTL_DEL, state.fd, &event);
}
bool fastTransfer(Loop *loop, Loop *newLoop, int events) {
stop(loop);
start(newLoop, this, events);
loop->numPolls--;
// needs to lock the newLoop's numPolls!
newLoop->numPolls++;
return true;
}
bool threadSafeChange(Loop *loop, Poll *self, int events) {
change(loop, self, events);
return true;
}
void close(Loop *loop, void (*cb)(Poll *)) {
state.fd = -1;
loop->closing.push_back({this, cb});
}
public:
bool isClosed() {
return state.fd == -1;
}
uv_os_sock_t getFd() {
return state.fd;
}
friend struct Loop;
};
// this should be put in the Loop as a general "post" function always available
struct Async : Poll {
void (*cb)(Async *);
Loop *loop;
void *data;
Async(Loop *loop) : Poll(loop, ::eventfd(0, EFD_CLOEXEC)) {
this->loop = loop;
}
void start(void (*cb)(Async *)) {
this->cb = cb;
Poll::setCb([](Poll *p, int, int) {
uint64_t val;
if (::read(((Async *) p)->state.fd, &val, 8) == 8) {
((Async *) p)->cb((Async *) p);
}
});
Poll::start(loop, this, UV_READABLE);
}
void send() {
uint64_t one = 1;
if (::write(state.fd, &one, 8) != 8) {
return;
}
}
void close() {
Poll::stop(loop);
::close(state.fd);
Poll::close(loop, [](Poll *p) {
delete p;
});
}
void setData(void *data) {
this->data = data;
}
void *getData() {
return data;
}
};
#endif // EPOLL_H
... ...
#include "Extensions.h"
namespace uWS {
enum ExtensionTokens {
TOK_PERMESSAGE_DEFLATE = 1838,
TOK_SERVER_NO_CONTEXT_TAKEOVER = 2807,
TOK_CLIENT_NO_CONTEXT_TAKEOVER = 2783,
TOK_SERVER_MAX_WINDOW_BITS = 2372,
TOK_CLIENT_MAX_WINDOW_BITS = 2348
};
class ExtensionsParser {
private:
int *lastInteger = nullptr;
public:
bool perMessageDeflate = false;
bool serverNoContextTakeover = false;
bool clientNoContextTakeover = false;
int serverMaxWindowBits = 0;
int clientMaxWindowBits = 0;
int getToken(const char *&in, const char *stop);
ExtensionsParser(const char *data, size_t length);
};
int ExtensionsParser::getToken(const char *&in, const char *stop) {
while (!isalnum(*in) && in != stop) {
in++;
}
int hashedToken = 0;
while (isalnum(*in) || *in == '-' || *in == '_') {
if (isdigit(*in)) {
hashedToken = hashedToken * 10 - (*in - '0');
} else {
hashedToken += *in;
}
in++;
}
return hashedToken;
}
ExtensionsParser::ExtensionsParser(const char *data, size_t length) {
const char *stop = data + length;
int token = 1;
for (; token && token != TOK_PERMESSAGE_DEFLATE; token = getToken(data, stop));
perMessageDeflate = (token == TOK_PERMESSAGE_DEFLATE);
while ((token = getToken(data, stop))) {
switch (token) {
case TOK_PERMESSAGE_DEFLATE:
return;
case TOK_SERVER_NO_CONTEXT_TAKEOVER:
serverNoContextTakeover = true;
break;
case TOK_CLIENT_NO_CONTEXT_TAKEOVER:
clientNoContextTakeover = true;
break;
case TOK_SERVER_MAX_WINDOW_BITS:
serverMaxWindowBits = 1;
lastInteger = &serverMaxWindowBits;
break;
case TOK_CLIENT_MAX_WINDOW_BITS:
clientMaxWindowBits = 1;
lastInteger = &clientMaxWindowBits;
break;
default:
if (token < 0 && lastInteger) {
*lastInteger = -token;
}
break;
}
}
}
template <bool isServer>
ExtensionsNegotiator<isServer>::ExtensionsNegotiator(int wantedOptions) {
options = wantedOptions;
}
template <bool isServer>
std::string ExtensionsNegotiator<isServer>::generateOffer() {
std::string extensionsOffer;
if (options & Options::PERMESSAGE_DEFLATE) {
extensionsOffer += "permessage-deflate";
if (options & Options::CLIENT_NO_CONTEXT_TAKEOVER) {
extensionsOffer += "; client_no_context_takeover";
}
if (options & Options::SERVER_NO_CONTEXT_TAKEOVER) {
extensionsOffer += "; server_no_context_takeover";
}
}
return extensionsOffer;
}
template <bool isServer>
void ExtensionsNegotiator<isServer>::readOffer(std::string offer) {
if (isServer) {
ExtensionsParser extensionsParser(offer.data(), offer.length());
if ((options & PERMESSAGE_DEFLATE) && extensionsParser.perMessageDeflate) {
if (extensionsParser.clientNoContextTakeover || (options & CLIENT_NO_CONTEXT_TAKEOVER)) {
options |= CLIENT_NO_CONTEXT_TAKEOVER;
}
if (extensionsParser.serverNoContextTakeover) {
options |= SERVER_NO_CONTEXT_TAKEOVER;
} else {
options &= ~SERVER_NO_CONTEXT_TAKEOVER;
}
} else {
options &= ~PERMESSAGE_DEFLATE;
}
} else {
// todo!
}
}
template <bool isServer>
int ExtensionsNegotiator<isServer>::getNegotiatedOptions() {
return options;
}
template class ExtensionsNegotiator<true>;
template class ExtensionsNegotiator<false>;
}
... ...
#ifndef EXTENSIONS_UWS_H
#define EXTENSIONS_UWS_H
#include <string>
namespace uWS {
enum Options : unsigned int {
NO_OPTIONS = 0,
PERMESSAGE_DEFLATE = 1,
SERVER_NO_CONTEXT_TAKEOVER = 2,
CLIENT_NO_CONTEXT_TAKEOVER = 4,
NO_DELAY = 8
};
template <bool isServer>
class ExtensionsNegotiator {
private:
int options;
public:
ExtensionsNegotiator(int wantedOptions);
std::string generateOffer();
void readOffer(std::string offer);
int getNegotiatedOptions();
};
}
#endif // EXTENSIONS_UWS_H
... ...
#include "Group.h"
#include "Hub.h"
namespace uWS {
template <bool isServer>
void Group<isServer>::setUserData(void *user) {
this->userData = user;
}
template <bool isServer>
void *Group<isServer>::getUserData() {
return userData;
}
template <bool isServer>
void Group<isServer>::timerCallback(Timer *timer) {
Group<isServer> *group = (Group<isServer> *) timer->getData();
group->forEach([](uWS::WebSocket<isServer> *webSocket) {
if (webSocket->hasOutstandingPong) {
webSocket->terminate();
} else {
webSocket->hasOutstandingPong = true;
}
});
if (group->userPingMessage.length()) {
group->broadcast(group->userPingMessage.data(), group->userPingMessage.length(), OpCode::TEXT);
} else {
group->broadcast(nullptr, 0, OpCode::PING);
}
}
template <bool isServer>
void Group<isServer>::startAutoPing(int intervalMs, std::string userMessage) {
timer = new Timer(loop);
timer->setData(this);
timer->start(timerCallback, intervalMs, intervalMs);
userPingMessage = userMessage;
}
template <bool isServer>
void Group<isServer>::addHttpSocket(HttpSocket<isServer> *httpSocket) {
if (httpSocketHead) {
httpSocketHead->prev = httpSocket;
httpSocket->next = httpSocketHead;
} else {
httpSocket->next = nullptr;
// start timer
httpTimer = new Timer(hub->getLoop());
httpTimer->setData(this);
httpTimer->start([](Timer *httpTimer) {
Group<isServer> *group = (Group<isServer> *) httpTimer->getData();
group->forEachHttpSocket([](HttpSocket<isServer> *httpSocket) {
if (httpSocket->missedDeadline) {
httpSocket->terminate();
} else if (!httpSocket->outstandingResponsesHead) {
httpSocket->missedDeadline = true;
}
});
}, 1000, 1000);
}
httpSocketHead = httpSocket;
httpSocket->prev = nullptr;
}
template <bool isServer>
void Group<isServer>::removeHttpSocket(HttpSocket<isServer> *httpSocket) {
if (iterators.size()) {
iterators.top() = httpSocket->next;
}
if (httpSocket->prev == httpSocket->next) {
httpSocketHead = nullptr;
httpTimer->stop();
httpTimer->close();
} else {
if (httpSocket->prev) {
((HttpSocket<isServer> *) httpSocket->prev)->next = httpSocket->next;
} else {
httpSocketHead = (HttpSocket<isServer> *) httpSocket->next;
}
if (httpSocket->next) {
((HttpSocket<isServer> *) httpSocket->next)->prev = httpSocket->prev;
}
}
}
template <bool isServer>
void Group<isServer>::addWebSocket(WebSocket<isServer> *webSocket) {
if (webSocketHead) {
webSocketHead->prev = webSocket;
webSocket->next = webSocketHead;
} else {
webSocket->next = nullptr;
}
webSocketHead = webSocket;
webSocket->prev = nullptr;
}
template <bool isServer>
void Group<isServer>::removeWebSocket(WebSocket<isServer> *webSocket) {
if (iterators.size()) {
iterators.top() = webSocket->next;
}
if (webSocket->prev == webSocket->next) {
webSocketHead = nullptr;
} else {
if (webSocket->prev) {
((WebSocket<isServer> *) webSocket->prev)->next = webSocket->next;
} else {
webSocketHead = (WebSocket<isServer> *) webSocket->next;
}
if (webSocket->next) {
((WebSocket<isServer> *) webSocket->next)->prev = webSocket->prev;
}
}
}
template <bool isServer>
Group<isServer>::Group(int extensionOptions, unsigned int maxPayload, Hub *hub, uS::NodeData *nodeData) : uS::NodeData(*nodeData), maxPayload(maxPayload), hub(hub), extensionOptions(extensionOptions) {
connectionHandler = [](WebSocket<isServer> *, HttpRequest) {};
transferHandler = [](WebSocket<isServer> *) {};
messageHandler = [](WebSocket<isServer> *, char *, size_t, OpCode) {};
disconnectionHandler = [](WebSocket<isServer> *, int, char *, size_t) {};
pingHandler = pongHandler = [](WebSocket<isServer> *, char *, size_t) {};
errorHandler = [](errorType) {};
httpRequestHandler = [](HttpResponse *, HttpRequest, char *, size_t, size_t) {};
httpConnectionHandler = [](HttpSocket<isServer> *) {};
httpDisconnectionHandler = [](HttpSocket<isServer> *) {};
httpCancelledRequestHandler = [](HttpResponse *) {};
httpDataHandler = [](HttpResponse *, char *, size_t, size_t) {};
this->extensionOptions |= CLIENT_NO_CONTEXT_TAKEOVER | SERVER_NO_CONTEXT_TAKEOVER;
}
template <bool isServer>
void Group<isServer>::stopListening() {
if (isServer) {
if (user) {
// todo: we should allow one group to listen to many ports!
uS::ListenSocket *listenSocket = (uS::ListenSocket *) user;
if (listenSocket->timer) {
listenSocket->timer->stop();
listenSocket->timer->close();
}
listenSocket->closeSocket<uS::ListenSocket>();
// mark as stopped listening (extra care?)
user = nullptr;
}
}
if (async) {
async->close();
}
}
template <bool isServer>
void Group<isServer>::onConnection(std::function<void (WebSocket<isServer> *, HttpRequest)> handler) {
connectionHandler = handler;
}
template <bool isServer>
void Group<isServer>::onTransfer(std::function<void (WebSocket<isServer> *)> handler) {
transferHandler = handler;
}
template <bool isServer>
void Group<isServer>::onMessage(std::function<void (WebSocket<isServer> *, char *, size_t, OpCode)> handler) {
messageHandler = handler;
}
template <bool isServer>
void Group<isServer>::onDisconnection(std::function<void (WebSocket<isServer> *, int, char *, size_t)> handler) {
disconnectionHandler = handler;
}
template <bool isServer>
void Group<isServer>::onPing(std::function<void (WebSocket<isServer> *, char *, size_t)> handler) {
pingHandler = handler;
}
template <bool isServer>
void Group<isServer>::onPong(std::function<void (WebSocket<isServer> *, char *, size_t)> handler) {
pongHandler = handler;
}
template <bool isServer>
void Group<isServer>::onError(std::function<void (typename Group::errorType)> handler) {
errorHandler = handler;
}
template <bool isServer>
void Group<isServer>::onHttpConnection(std::function<void (HttpSocket<isServer> *)> handler) {
httpConnectionHandler = handler;
}
template <bool isServer>
void Group<isServer>::onHttpRequest(std::function<void (HttpResponse *, HttpRequest, char *, size_t, size_t)> handler) {
httpRequestHandler = handler;
}
template <bool isServer>
void Group<isServer>::onHttpData(std::function<void(HttpResponse *, char *, size_t, size_t)> handler) {
httpDataHandler = handler;
}
template <bool isServer>
void Group<isServer>::onHttpDisconnection(std::function<void (HttpSocket<isServer> *)> handler) {
httpDisconnectionHandler = handler;
}
template <bool isServer>
void Group<isServer>::onCancelledHttpRequest(std::function<void (HttpResponse *)> handler) {
httpCancelledRequestHandler = handler;
}
template <bool isServer>
void Group<isServer>::onHttpUpgrade(std::function<void(HttpSocket<isServer> *, HttpRequest)> handler) {
httpUpgradeHandler = handler;
}
template <bool isServer>
void Group<isServer>::broadcast(const char *message, size_t length, OpCode opCode) {
#ifdef UWS_THREADSAFE
std::lock_guard<std::recursive_mutex> lockGuard(*asyncMutex);
#endif
typename WebSocket<isServer>::PreparedMessage *preparedMessage = WebSocket<isServer>::prepareMessage((char *) message, length, opCode, false);
forEach([preparedMessage](uWS::WebSocket<isServer> *ws) {
ws->sendPrepared(preparedMessage);
});
WebSocket<isServer>::finalizeMessage(preparedMessage);
}
template <bool isServer>
void Group<isServer>::terminate() {
forEach([](uWS::WebSocket<isServer> *ws) {
ws->terminate();
});
stopListening();
}
template <bool isServer>
void Group<isServer>::close(int code, char *message, size_t length) {
forEach([code, message, length](uWS::WebSocket<isServer> *ws) {
ws->close(code, message, length);
});
stopListening();
if (timer) {
timer->stop();
timer->close();
}
}
template struct Group<true>;
template struct Group<false>;
}
... ...
#ifndef GROUP_UWS_H
#define GROUP_UWS_H
#include "WebSocket.h"
#include "HTTPSocket.h"
#include "Extensions.h"
#include <functional>
#include <stack>
namespace uWS {
enum ListenOptions {
TRANSFERS
};
struct Hub;
template <bool isServer>
struct WIN32_EXPORT Group : private uS::NodeData {
protected:
friend struct Hub;
friend struct WebSocket<isServer>;
friend struct HttpSocket<false>;
friend struct HttpSocket<true>;
std::function<void(WebSocket<isServer> *, HttpRequest)> connectionHandler;
std::function<void(WebSocket<isServer> *)> transferHandler;
std::function<void(WebSocket<isServer> *, char *message, size_t length, OpCode opCode)> messageHandler;
std::function<void(WebSocket<isServer> *, int code, char *message, size_t length)> disconnectionHandler;
std::function<void(WebSocket<isServer> *, char *, size_t)> pingHandler;
std::function<void(WebSocket<isServer> *, char *, size_t)> pongHandler;
std::function<void(HttpSocket<isServer> *)> httpConnectionHandler;
std::function<void(HttpResponse *, HttpRequest, char *, size_t, size_t)> httpRequestHandler;
std::function<void(HttpResponse *, char *, size_t, size_t)> httpDataHandler;
std::function<void(HttpResponse *)> httpCancelledRequestHandler;
std::function<void(HttpSocket<isServer> *)> httpDisconnectionHandler;
std::function<void(HttpSocket<isServer> *, HttpRequest)> httpUpgradeHandler;
using errorType = typename std::conditional<isServer, int, void *>::type;
std::function<void(errorType)> errorHandler;
unsigned int maxPayload;
Hub *hub;
int extensionOptions;
Timer *timer = nullptr, *httpTimer = nullptr;
std::string userPingMessage;
std::stack<Poll *> iterators;
// todo: cannot be named user, collides with parent!
void *userData = nullptr;
static void timerCallback(Timer *timer);
WebSocket<isServer> *webSocketHead = nullptr;
HttpSocket<isServer> *httpSocketHead = nullptr;
void addWebSocket(WebSocket<isServer> *webSocket);
void removeWebSocket(WebSocket<isServer> *webSocket);
// todo: remove these, template
void addHttpSocket(HttpSocket<isServer> *httpSocket);
void removeHttpSocket(HttpSocket<isServer> *httpSocket);
Group(int extensionOptions, unsigned int maxPayload, Hub *hub, uS::NodeData *nodeData);
void stopListening();
public:
void onConnection(std::function<void(WebSocket<isServer> *, HttpRequest)> handler);
void onTransfer(std::function<void(WebSocket<isServer> *)> handler);
void onMessage(std::function<void(WebSocket<isServer> *, char *, size_t, OpCode)> handler);
void onDisconnection(std::function<void(WebSocket<isServer> *, int code, char *message, size_t length)> handler);
void onPing(std::function<void(WebSocket<isServer> *, char *, size_t)> handler);
void onPong(std::function<void(WebSocket<isServer> *, char *, size_t)> handler);
void onError(std::function<void(errorType)> handler);
void onHttpConnection(std::function<void(HttpSocket<isServer> *)> handler);
void onHttpRequest(std::function<void(HttpResponse *, HttpRequest, char *data, size_t length, size_t remainingBytes)> handler);
void onHttpData(std::function<void(HttpResponse *, char *data, size_t length, size_t remainingBytes)> handler);
void onHttpDisconnection(std::function<void(HttpSocket<isServer> *)> handler);
void onCancelledHttpRequest(std::function<void(HttpResponse *)> handler);
void onHttpUpgrade(std::function<void(HttpSocket<isServer> *, HttpRequest)> handler);
// Thread safe
void broadcast(const char *message, size_t length, OpCode opCode);
void setUserData(void *user);
void *getUserData();
// Not thread safe
void terminate();
void close(int code = 1000, char *message = nullptr, size_t length = 0);
void startAutoPing(int intervalMs, std::string userMessage = "");
// same as listen(TRANSFERS), backwards compatible API for now
void addAsync() {
if (!async) {
NodeData::addAsync();
}
}
void listen(ListenOptions listenOptions) {
if (listenOptions == TRANSFERS && !async) {
addAsync();
}
}
template <class F>
void forEach(const F &cb) {
Poll *iterator = webSocketHead;
iterators.push(iterator);
while (iterator) {
Poll *lastIterator = iterator;
cb((WebSocket<isServer> *) iterator);
iterator = iterators.top();
if (lastIterator == iterator) {
iterator = ((uS::Socket *) iterator)->next;
iterators.top() = iterator;
}
}
iterators.pop();
}
// duplicated code for now!
template <class F>
void forEachHttpSocket(const F &cb) {
Poll *iterator = httpSocketHead;
iterators.push(iterator);
while (iterator) {
Poll *lastIterator = iterator;
cb((HttpSocket<isServer> *) iterator);
iterator = iterators.top();
if (lastIterator == iterator) {
iterator = ((uS::Socket *) iterator)->next;
iterators.top() = iterator;
}
}
iterators.pop();
}
static Group<isServer> *from(uS::Socket *s) {
return static_cast<Group<isServer> *>(s->getNodeData());
}
};
}
#endif // GROUP_UWS_H
... ...
#include "HTTPSocket.h"
#include "Group.h"
#include "Extensions.h"
#include <cstdio>
#define MAX_HEADERS 100
#define MAX_HEADER_BUFFER_SIZE 4096
#define FORCE_SLOW_PATH false
namespace uWS {
// UNSAFETY NOTE: assumes *end == '\r' (might unref end pointer)
char *getHeaders(char *buffer, char *end, Header *headers, size_t maxHeaders) {
for (unsigned int i = 0; i < maxHeaders; i++) {
for (headers->key = buffer; (*buffer != ':') & (*buffer > 32); *(buffer++) |= 32);
if (*buffer == '\r') {
if ((buffer != end) & (buffer[1] == '\n') & (i > 0)) {
headers->key = nullptr;
return buffer + 2;
} else {
return nullptr;
}
} else {
headers->keyLength = buffer - headers->key;
for (buffer++; (*buffer == ':' || *buffer < 33) && *buffer != '\r'; buffer++);
headers->value = buffer;
buffer = (char *) memchr(buffer, '\r', end - buffer); //for (; *buffer != '\r'; buffer++);
if (buffer /*!= end*/ && buffer[1] == '\n') {
headers->valueLength = buffer - headers->value;
buffer += 2;
headers++;
} else {
return nullptr;
}
}
}
return nullptr;
}
// UNSAFETY NOTE: assumes 24 byte input length
static void base64(unsigned char *src, char *dst) {
static const char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
for (int i = 0; i < 18; i += 3) {
*dst++ = b64[(src[i] >> 2) & 63];
*dst++ = b64[((src[i] & 3) << 4) | ((src[i + 1] & 240) >> 4)];
*dst++ = b64[((src[i + 1] & 15) << 2) | ((src[i + 2] & 192) >> 6)];
*dst++ = b64[src[i + 2] & 63];
}
*dst++ = b64[(src[18] >> 2) & 63];
*dst++ = b64[((src[18] & 3) << 4) | ((src[19] & 240) >> 4)];
*dst++ = b64[((src[19] & 15) << 2)];
*dst++ = '=';
}
template <bool isServer>
uS::Socket *HttpSocket<isServer>::onData(uS::Socket *s, char *data, size_t length) {
HttpSocket<isServer> *httpSocket = (HttpSocket<isServer> *) s;
httpSocket->cork(true);
if (httpSocket->contentLength) {
httpSocket->missedDeadline = false;
if (httpSocket->contentLength >= length) {
Group<isServer>::from(httpSocket)->httpDataHandler(httpSocket->outstandingResponsesTail, data, length, httpSocket->contentLength -= length);
return httpSocket;
} else {
Group<isServer>::from(httpSocket)->httpDataHandler(httpSocket->outstandingResponsesTail, data, httpSocket->contentLength, 0);
data += httpSocket->contentLength;
length -= httpSocket->contentLength;
httpSocket->contentLength = 0;
}
}
if (FORCE_SLOW_PATH || httpSocket->httpBuffer.length()) {
if (httpSocket->httpBuffer.length() + length > MAX_HEADER_BUFFER_SIZE) {
httpSocket->onEnd(httpSocket);
return httpSocket;
}
httpSocket->httpBuffer.reserve(httpSocket->httpBuffer.length() + length + WebSocketProtocol<uWS::CLIENT, WebSocket<uWS::CLIENT>>::CONSUME_POST_PADDING);
httpSocket->httpBuffer.append(data, length);
data = (char *) httpSocket->httpBuffer.data();
length = httpSocket->httpBuffer.length();
}
char *end = data + length;
char *cursor = data;
*end = '\r';
Header headers[MAX_HEADERS];
do {
char *lastCursor = cursor;
if ((cursor = getHeaders(cursor, end, headers, MAX_HEADERS))) {
HttpRequest req(headers);
if (isServer) {
headers->valueLength = std::max<int>(0, headers->valueLength - 9);
httpSocket->missedDeadline = false;
if (req.getHeader("upgrade", 7)) {
if (Group<SERVER>::from(httpSocket)->httpUpgradeHandler) {
Group<SERVER>::from(httpSocket)->httpUpgradeHandler((HttpSocket<SERVER> *) httpSocket, req);
} else {
Header secKey = req.getHeader("sec-websocket-key", 17);
Header extensions = req.getHeader("sec-websocket-extensions", 24);
Header subprotocol = req.getHeader("sec-websocket-protocol", 22);
if (secKey.valueLength == 24) {
bool perMessageDeflate;
httpSocket->upgrade(secKey.value, extensions.value, extensions.valueLength,
subprotocol.value, subprotocol.valueLength, &perMessageDeflate);
Group<isServer>::from(httpSocket)->removeHttpSocket(httpSocket);
// Warning: changes socket, needs to inform the stack of Poll address change!
WebSocket<isServer> *webSocket = new WebSocket<isServer>(perMessageDeflate, httpSocket);
webSocket->template setState<WebSocket<isServer>>();
webSocket->change(webSocket->nodeData->loop, webSocket, webSocket->setPoll(UV_READABLE));
Group<isServer>::from(webSocket)->addWebSocket(webSocket);
webSocket->cork(true);
Group<isServer>::from(webSocket)->connectionHandler(webSocket, req);
// todo: should not uncork if closed!
webSocket->cork(false);
delete httpSocket;
return webSocket;
} else {
httpSocket->onEnd(httpSocket);
}
}
return httpSocket;
} else {
if (Group<SERVER>::from(httpSocket)->httpRequestHandler) {
HttpResponse *res = HttpResponse::allocateResponse(httpSocket);
if (httpSocket->outstandingResponsesTail) {
httpSocket->outstandingResponsesTail->next = res;
} else {
httpSocket->outstandingResponsesHead = res;
}
httpSocket->outstandingResponsesTail = res;
Header contentLength;
if (req.getMethod() != HttpMethod::METHOD_GET && (contentLength = req.getHeader("content-length", 14))) {
httpSocket->contentLength = atoi(contentLength.value);
size_t bytesToRead = std::min<int>(httpSocket->contentLength, end - cursor);
Group<SERVER>::from(httpSocket)->httpRequestHandler(res, req, cursor, bytesToRead, httpSocket->contentLength -= bytesToRead);
cursor += bytesToRead;
} else {
Group<SERVER>::from(httpSocket)->httpRequestHandler(res, req, nullptr, 0, 0);
}
if (httpSocket->isClosed() || httpSocket->isShuttingDown()) {
return httpSocket;
}
} else {
httpSocket->onEnd(httpSocket);
return httpSocket;
}
}
} else {
if (req.getHeader("upgrade", 7)) {
// Warning: changes socket, needs to inform the stack of Poll address change!
WebSocket<isServer> *webSocket = new WebSocket<isServer>(false, httpSocket);
httpSocket->cancelTimeout();
webSocket->setUserData(httpSocket->httpUser);
webSocket->template setState<WebSocket<isServer>>();
webSocket->change(webSocket->nodeData->loop, webSocket, webSocket->setPoll(UV_READABLE));
Group<isServer>::from(webSocket)->addWebSocket(webSocket);
webSocket->cork(true);
Group<isServer>::from(webSocket)->connectionHandler(webSocket, req);
if (!(webSocket->isClosed() || webSocket->isShuttingDown())) {
WebSocketProtocol<isServer, WebSocket<isServer>>::consume(cursor, end - cursor, webSocket);
}
webSocket->cork(false);
delete httpSocket;
return webSocket;
} else {
httpSocket->onEnd(httpSocket);
}
return httpSocket;
}
} else {
if (!httpSocket->httpBuffer.length()) {
if (length > MAX_HEADER_BUFFER_SIZE) {
httpSocket->onEnd(httpSocket);
} else {
httpSocket->httpBuffer.append(lastCursor, end - lastCursor);
}
}
return httpSocket;
}
} while(cursor != end);
httpSocket->cork(false);
httpSocket->httpBuffer.clear();
return httpSocket;
}
// todo: make this into a transformer and make use of sendTransformed
template <bool isServer>
void HttpSocket<isServer>::upgrade(const char *secKey, const char *extensions, size_t extensionsLength,
const char *subprotocol, size_t subprotocolLength, bool *perMessageDeflate) {
Queue::Message *messagePtr;
if (isServer) {
*perMessageDeflate = false;
std::string extensionsResponse;
if (extensionsLength) {
Group<isServer> *group = Group<isServer>::from(this);
ExtensionsNegotiator<uWS::SERVER> extensionsNegotiator(group->extensionOptions);
extensionsNegotiator.readOffer(std::string(extensions, extensionsLength));
extensionsResponse = extensionsNegotiator.generateOffer();
if (extensionsNegotiator.getNegotiatedOptions() & PERMESSAGE_DEFLATE) {
*perMessageDeflate = true;
}
}
unsigned char shaInput[] = "XXXXXXXXXXXXXXXXXXXXXXXX258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
memcpy(shaInput, secKey, 24);
unsigned char shaDigest[SHA_DIGEST_LENGTH];
SHA1(shaInput, sizeof(shaInput) - 1, shaDigest);
char upgradeBuffer[1024];
memcpy(upgradeBuffer, "HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: ", 97);
base64(shaDigest, upgradeBuffer + 97);
memcpy(upgradeBuffer + 125, "\r\n", 2);
size_t upgradeResponseLength = 127;
if (extensionsResponse.length() && extensionsResponse.length() < 200) {
memcpy(upgradeBuffer + upgradeResponseLength, "Sec-WebSocket-Extensions: ", 26);
memcpy(upgradeBuffer + upgradeResponseLength + 26, extensionsResponse.data(), extensionsResponse.length());
memcpy(upgradeBuffer + upgradeResponseLength + 26 + extensionsResponse.length(), "\r\n", 2);
upgradeResponseLength += 26 + extensionsResponse.length() + 2;
}
if (subprotocolLength && subprotocolLength < 200) {
memcpy(upgradeBuffer + upgradeResponseLength, "Sec-WebSocket-Protocol: ", 24);
memcpy(upgradeBuffer + upgradeResponseLength + 24, subprotocol, subprotocolLength);
memcpy(upgradeBuffer + upgradeResponseLength + 24 + subprotocolLength, "\r\n", 2);
upgradeResponseLength += 24 + subprotocolLength + 2;
}
static char stamp[] = "Sec-WebSocket-Version: 13\r\nWebSocket-Server: uWebSockets\r\n\r\n";
memcpy(upgradeBuffer + upgradeResponseLength, stamp, sizeof(stamp) - 1);
upgradeResponseLength += sizeof(stamp) - 1;
messagePtr = allocMessage(upgradeResponseLength, upgradeBuffer);
} else {
messagePtr = allocMessage(httpBuffer.length(), httpBuffer.data());
httpBuffer.clear();
}
bool wasTransferred;
if (write(messagePtr, wasTransferred)) {
if (!wasTransferred) {
freeMessage(messagePtr);
} else {
messagePtr->callback = nullptr;
}
} else {
freeMessage(messagePtr);
}
}
template <bool isServer>
void HttpSocket<isServer>::onEnd(uS::Socket *s) {
HttpSocket<isServer> *httpSocket = (HttpSocket<isServer> *) s;
if (!httpSocket->isShuttingDown()) {
if (isServer) {
Group<isServer>::from(httpSocket)->removeHttpSocket(httpSocket);
Group<isServer>::from(httpSocket)->httpDisconnectionHandler(httpSocket);
}
} else {
httpSocket->cancelTimeout();
}
httpSocket->template closeSocket<HttpSocket<isServer>>();
while (!httpSocket->messageQueue.empty()) {
Queue::Message *message = httpSocket->messageQueue.front();
if (message->callback) {
message->callback(nullptr, message->callbackData, true, nullptr);
}
httpSocket->messageQueue.pop();
}
while (httpSocket->outstandingResponsesHead) {
Group<isServer>::from(httpSocket)->httpCancelledRequestHandler(httpSocket->outstandingResponsesHead);
HttpResponse *next = httpSocket->outstandingResponsesHead->next;
delete httpSocket->outstandingResponsesHead;
httpSocket->outstandingResponsesHead = next;
}
if (httpSocket->preAllocatedResponse) {
delete httpSocket->preAllocatedResponse;
}
httpSocket->nodeData->clearPendingPollChanges(httpSocket);
if (!isServer) {
httpSocket->cancelTimeout();
Group<CLIENT>::from(httpSocket)->errorHandler(httpSocket->httpUser);
}
}
template struct HttpSocket<SERVER>;
template struct HttpSocket<CLIENT>;
}
... ...
#ifndef HTTPSOCKET_UWS_H
#define HTTPSOCKET_UWS_H
#include "Socket.h"
#include <string>
// #include <experimental/string_view>
namespace uWS {
struct Header {
char *key, *value;
unsigned int keyLength, valueLength;
operator bool() {
return key;
}
// slow without string_view!
std::string toString() {
return std::string(value, valueLength);
}
};
enum HttpMethod {
METHOD_GET,
METHOD_POST,
METHOD_PUT,
METHOD_DELETE,
METHOD_PATCH,
METHOD_OPTIONS,
METHOD_HEAD,
METHOD_TRACE,
METHOD_CONNECT,
METHOD_INVALID
};
struct HttpRequest {
Header *headers;
Header getHeader(const char *key) {
return getHeader(key, strlen(key));
}
HttpRequest(Header *headers = nullptr) : headers(headers) {}
Header getHeader(const char *key, size_t length) {
if (headers) {
for (Header *h = headers; *++h; ) {
if (h->keyLength == length && !strncmp(h->key, key, length)) {
return *h;
}
}
}
return {nullptr, nullptr, 0, 0};
}
Header getUrl() {
if (headers->key) {
return *headers;
}
return {nullptr, nullptr, 0, 0};
}
HttpMethod getMethod() {
if (!headers->key) {
return METHOD_INVALID;
}
switch (headers->keyLength) {
case 3:
if (!strncmp(headers->key, "get", 3)) {
return METHOD_GET;
} else if (!strncmp(headers->key, "put", 3)) {
return METHOD_PUT;
}
break;
case 4:
if (!strncmp(headers->key, "post", 4)) {
return METHOD_POST;
} else if (!strncmp(headers->key, "head", 4)) {
return METHOD_HEAD;
}
break;
case 5:
if (!strncmp(headers->key, "patch", 5)) {
return METHOD_PATCH;
} else if (!strncmp(headers->key, "trace", 5)) {
return METHOD_TRACE;
}
break;
case 6:
if (!strncmp(headers->key, "delete", 6)) {
return METHOD_DELETE;
}
break;
case 7:
if (!strncmp(headers->key, "options", 7)) {
return METHOD_OPTIONS;
} else if (!strncmp(headers->key, "connect", 7)) {
return METHOD_CONNECT;
}
break;
}
return METHOD_INVALID;
}
};
struct HttpResponse;
template <const bool isServer>
struct WIN32_EXPORT HttpSocket : uS::Socket {
void *httpUser; // remove this later, setTimeout occupies user for now
HttpResponse *outstandingResponsesHead = nullptr;
HttpResponse *outstandingResponsesTail = nullptr;
HttpResponse *preAllocatedResponse = nullptr;
std::string httpBuffer;
size_t contentLength = 0;
bool missedDeadline = false;
HttpSocket(uS::Socket *socket) : uS::Socket(std::move(*socket)) {}
void terminate() {
onEnd(this);
}
void upgrade(const char *secKey, const char *extensions,
size_t extensionsLength, const char *subprotocol,
size_t subprotocolLength, bool *perMessageDeflate);
private:
friend struct uS::Socket;
friend struct HttpResponse;
friend struct Hub;
static uS::Socket *onData(uS::Socket *s, char *data, size_t length);
static void onEnd(uS::Socket *s);
};
struct HttpResponse {
HttpSocket<true> *httpSocket;
HttpResponse *next = nullptr;
void *userData = nullptr;
void *extraUserData = nullptr;
HttpSocket<true>::Queue::Message *messageQueue = nullptr;
bool hasEnded = false;
bool hasHead = false;
HttpResponse(HttpSocket<true> *httpSocket) : httpSocket(httpSocket) {
}
template <bool isServer>
static HttpResponse *allocateResponse(HttpSocket<isServer> *httpSocket) {
if (httpSocket->preAllocatedResponse) {
HttpResponse *ret = httpSocket->preAllocatedResponse;
httpSocket->preAllocatedResponse = nullptr;
return ret;
} else {
return new HttpResponse((HttpSocket<true> *) httpSocket);
}
}
//template <bool isServer>
void freeResponse(HttpSocket<true> *httpData) {
if (httpData->preAllocatedResponse) {
delete this;
} else {
httpData->preAllocatedResponse = this;
}
}
void write(const char *message, size_t length = 0,
void(*callback)(void *httpSocket, void *data, bool cancelled, void *reserved) = nullptr,
void *callbackData = nullptr) {
struct NoopTransformer {
static size_t estimate(const char *data, size_t length) {
return length;
}
static size_t transform(const char *src, char *dst, size_t length, int transformData) {
memcpy(dst, src, length);
return length;
}
};
httpSocket->sendTransformed<NoopTransformer>(message, length, callback, callbackData, 0);
hasHead = true;
}
// todo: maybe this function should have a fast path for 0 length?
void end(const char *message = nullptr, size_t length = 0,
void(*callback)(void *httpResponse, void *data, bool cancelled, void *reserved) = nullptr,
void *callbackData = nullptr) {
struct TransformData {
bool hasHead;
} transformData = {hasHead};
struct HttpTransformer {
// todo: this should get TransformData!
static size_t estimate(const char *data, size_t length) {
return length + 128;
}
static size_t transform(const char *src, char *dst, size_t length, TransformData transformData) {
// todo: sprintf is extremely slow
int offset = transformData.hasHead ? 0 : std::sprintf(dst, "HTTP/1.1 200 OK\r\nContent-Length: %u\r\n\r\n", (unsigned int) length);
memcpy(dst + offset, src, length);
return length + offset;
}
};
if (httpSocket->outstandingResponsesHead != this) {
HttpSocket<true>::Queue::Message *messagePtr = httpSocket->allocMessage(HttpTransformer::estimate(message, length));
messagePtr->length = HttpTransformer::transform(message, (char *) messagePtr->data, length, transformData);
messagePtr->callback = callback;
messagePtr->callbackData = callbackData;
messagePtr->nextMessage = messageQueue;
messageQueue = messagePtr;
hasEnded = true;
} else {
httpSocket->sendTransformed<HttpTransformer>(message, length, callback, callbackData, transformData);
// move head as far as possible
HttpResponse *head = next;
while (head) {
// empty message queue
HttpSocket<true>::Queue::Message *messagePtr = head->messageQueue;
while (messagePtr) {
HttpSocket<true>::Queue::Message *nextMessage = messagePtr->nextMessage;
bool wasTransferred;
if (httpSocket->write(messagePtr, wasTransferred)) {
if (!wasTransferred) {
httpSocket->freeMessage(messagePtr);
if (callback) {
callback(this, callbackData, false, nullptr);
}
} else {
messagePtr->callback = callback;
messagePtr->callbackData = callbackData;
}
} else {
httpSocket->freeMessage(messagePtr);
if (callback) {
callback(this, callbackData, true, nullptr);
}
goto updateHead;
}
messagePtr = nextMessage;
}
// cannot go beyond unfinished responses
if (!head->hasEnded) {
break;
} else {
HttpResponse *next = head->next;
head->freeResponse(httpSocket);
head = next;
}
}
updateHead:
httpSocket->outstandingResponsesHead = head;
if (!head) {
httpSocket->outstandingResponsesTail = nullptr;
}
freeResponse(httpSocket);
}
}
void setUserData(void *userData) {
this->userData = userData;
}
void *getUserData() {
return userData;
}
HttpSocket<true> *getHttpSocket() {
return httpSocket;
}
};
}
#endif // HTTPSOCKET_UWS_H
... ...