Passing and receiving array object between Node.js and C++ binding
$ g++ -dynamiclib -o mylib.dylib main.cpp
$ node index.js
[matrix size: 100x100; n_nonzero: 4; density: 0.04%]
(1, 1) 2.0000
| // Shinobi (http://shinobi.video) - FFMPEG FLV over HTTP Test | |
| // How to Use | |
| // 1. Navigate to directory where this file is. | |
| // 2. Run `npm install express` | |
| // 3. Start with `node ffmpegToWeb.js` | |
| // 4. Get the IP address of the computer where you did step 1. Example : 127.0.0.1 | |
| // 5. Open `http://127.0.0.1:8001/` in your browser. | |
| var child = require('child_process'); | |
| var events = require('events'); |
| var net = require('net'); | |
| // | |
| // Client | |
| // | |
| function openSocket() { | |
| var socket = net.connect(3e3); | |
| socket.setKeepAlive(true); | |
| socket.on('connect', onConnect.bind({}, socket)); |
| sudo apt-get install avahi-daemon avahi-discover avahi-utils libnss-mdns mdns-scan |