zoukankan      html  css  js  c++  java
  • addon-uWebSockets记录

    1.搞清楚 .d.ts如何生成

    /** A WebSocket connection that is valid from open to close event */

    export interface WebSocket {}

    /** A structure holding settings and handlers for a WebSocket route handler. */
    export interface WebSocketBehavior {}

    /** Constructs a non-SSL app */
    export function App(options?: AppOptions): TemplatedApp;


    V8引擎嵌入JavaScript
    UniquePersistent

    sudo yum install gcc-aarch64-linux-gnu

    ------------------------------------------------------------
    编译和配置 uWebSockets.js工程:

    1.修改CLang为gcc (build.c)
    2.添加 -I/usr/include路径
    3.


    ---------------------------------------------------------
    1.准备工作:

    安装 typescript 等插件
    npm i -g typescript
    npm i -g nodemon
    npm install typings --global

    编译node插件,需要用到 node-gyp
    全局安装 node-gyp
    npm install -g node-gyp

    其他2个模块:
    npm i -g nan
    ###npm i -g napi
    还需要配置NODE路径:
    export NODE_PATH=$(npm root -g)


    或者在目录下面安装这2个模块:
    npm install nan
    npm install napai

    ------------------------------------------------------
    2.构建
    2.1创建一个 binding.gyp 的文件
    2.2执行下面的命令:
    node-gyp configure
    node-gyp build

    ------------------------------------------------------


    创建一个ts工程:
    ------------------------------------------------------
    npm init -y
    tsc --init
    code .

    npm install -s mongodb
    npm install -s @types/mongoose
    npm i @types/node

    v8::Local<v8::Context> Isolate::GetCurrentContext() {
    i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
    i::Context context = isolate->context();
    if (context.is_null()) return Local<Context>();
    i::Context native_context = context.native_context();
    if (native_context.is_null()) return Local<Context>();
    return Utils::ToLocal(i::Handle<i::Context>(native_context, isolate));
    }


    template<typename T>
    ReturnValue<T> FunctionCallbackInfo<T>::GetReturnValue() const {
    return ReturnValue<T>(&implicit_args_[kReturnValueIndex]);
    }

    http://10.88.0.191:8888/rpc?t=&d=%7B%22_c_%22:%22%22,%22_a_%22:%22auth%22,%22_p_%22:%7B%22req%22:%7B%22query%22:%7B%22pwd%22:%22
    123456
    %22,%22ac%22:%22
    henry_1001
    %22%7D%7D,%22st%22:%22ZSJ%22%7D%7D

    ========================================================== Integer
    /**
    * A JavaScript value representing a signed integer.
    */
    class V8_EXPORT Integer : public Number {
    public:
    static Local<Integer> New(Isolate* isolate, int32_t value);
    static Local<Integer> NewFromUnsigned(Isolate* isolate, uint32_t value);
    int64_t Value() const;
    V8_INLINE static Integer* Cast(v8::Value* obj);
    private:
    Integer();
    static void CheckCast(v8::Value* obj);
    };


    sshRemote 远端调试

    map,用userid作为key


    192.168.163.135

  • 相关阅读:
    国家电网 ERP系统
    小亚通SaaS ERP & 小鹅通 Education
    CRM User(Customer) Employee
    Docker ERP CRM
    OA、CRM、ERP之间的区别和联系是什么?
    基于jfinal开发的12306抢票软件
    15款优质Spring开源项目 脚手架
    Echart 跨域 Data Demo
    区块链+金融,带你直击实践应用中的需求和痛点
    thinkphp 5.0报错pcntl_signal() has been disabled for security reasons问题解决
  • 原文地址:https://www.cnblogs.com/music-liang/p/13129190.html
Copyright © 2011-2022 走看看