libuv

Calling Javascript function from a C++ callback in V8

僤鯓⒐⒋嵵緔 提交于 2019-11-27 13:07:48
问题 I'm trying to call a registered JS function when a c++ callback is called, but I'm getting a segfault for what I assume is a scoping issue. Handle<Value> addEventListener( const Arguments& args ) { HandleScope scope; if (!args[0]->IsFunction()) { return ThrowException(Exception::TypeError(String::New("Wrong arguments"))); } Persistent<Function> fn = Persistent<Function>::New(Handle<Function>::Cast(args[0])); Local<Number> num = Number::New(registerListener(&callback, &fn)); scope.Close(num);

Kestrel服务器

蓝咒 提交于 2019-11-27 09:47:03
阅读目录 Kestrel服务器 什么是Kestrel服务器 回到目录 Kestrel服务器 回到目录 什么是Kestrel服务器 Kestrel是开源的( GitHub 提供的源代码),事件驱动的异步I / O服务器,用于在任何平台上托管ASP.NET应用程序。这是一个监听服务器和一个命令行界面。您将侦听服务器安装在Windows或Linux服务器上,并在计算机上安装命令行界面(安装.netcore会自动一整套安装)。(Kestrel发音: ['kestr(ə)l] ) 它是与ASP.NET Core一起由微软推出的。所有ASP.NET Core应用程序都使用新的MVC框架和Kestrel Web服务器。这些新的应用程序可以运行在完整的.NET Framework或.NET Core上。 Kestrel Web服务器的概述 Kestrel被认为是较新的ASP.NET应用程序的首选Web服务器(请参阅这篇文章与IIS比较, why you need both )。它j机遇 libuv library ,与node.js使用的 库 相同。Libuv支持事件驱动的编程风格。它的一些核心工具包括: 非阻塞网络支持 异步文件系统访问 计时器 子进程 它允许ASP.NET Core应用程序在其他跨平台的Web服务器(如Jexus,Nginx和Apache)上轻松运行,而无需解决不同的启动配置

在 Visual Studio 2015 下编译 LibUV-1.9.1

半世苍凉 提交于 2019-11-27 08:18:03
作者: Angus.Fenying < i.am.x.fenying@gmail.com > 日期: 2016-09-25 10:21 PM 首先,到 LibUV 官网 下载源代码,我用的是 1.9.1 版本,将其解压出来,这里是 H:\Projects\C\libuv 。 自行安装 Git For Windows,这里假定你安装到了 C:\Program Files (x86)\Git 。 接着打开 VS2015 x64 Native Tools Command Prompt,进入解压的目录 H:\Projects\C\libuv 。 执行 set VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\ set PATH=%PATH%;C:\Program Files (x86)\Git\bin 注意把上面的 C:\Program Files (x86)\Microsoft Visual Studio 14.0 改为你的 VS2015 安装路径。 修改 vcbuild.bat 的 44~92 行内容为下面的两行代码: call "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset% set GYP_MSVS

How is asynchronous javascript interpreted and executed in Node.js?

↘锁芯ラ 提交于 2019-11-27 00:37:03
问题 I've been doing a lot of research into the core of Node.js lately, and I have some questions about the inner workings of the Node platform. As I understand it, Node.js works like this: Node has an API, written in Javascript, that allows the programmer to interact with things like the filesystem and network. However, all of that functionality is actually done by C/C++ code, also a part of Node. Here is where things get a little fuzzy. So it's the Chrome V8 engine's job to essentially "compile"

Visual Studio编译 libuv

狂风中的少年 提交于 2019-11-26 20:26:14
libuv 是 Node 的新跨平台抽象层,用于抽象 Windows 的 IOCP 及 Unix 的 libev。作者打算在这个库的包含所有平台的差异性。 特性: 非阻塞 TCP 套接字 非阻塞命名管道 UDP 定时器 子进程生成 通过 uv_getaddrinfo 实现异步 DNS 异步文件系统 API:uv_fs_* 高分辨率时间:uv_hrtime 正在运行程序路径查找:uv_exepath 线程池调度:uv_queue_work TTY控制的ANSI转义代码: uv_tty_t 文件系统事件现在支持 inotify, ReadDirectoryChangesW 和 kqueue。很快会支持事件端口:uv_fs_event_t 进程间的 IPC 与套接字共享:uv_write2 已受支持的平台: Microsoft Windows 操作系统,如 Windows XP SP2。使用 Visual Studio 或 MinGW 构建 Linux 2.6 使用 GCC 工具链 MacOS 使用 GCC 或 XCode 工具链 Solaris 121 或之后版本,使用 GCC 工具链 以下是正题: (1)采用VS2005编译( 以失败告终) 几点经验: 1.默认安装python时无环境变量,要在环境变量里增加 python的安装路径,path c:\python27等