.----------------------------------------.
| write(data)-------->emit('data', data`)|
`----------------------------------------`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MuxDemux = require('mux-demux'); | |
var net = require('net'); | |
var Model = require('scuttlebutt/model'); | |
var aModel = new Model | |
var bModel = new Model | |
//the scuttlebutt's must have 1 stream per connection, | |
//therefore they must be created inside the server handler. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var browserify = require('./'); | |
var through = require('through'); | |
var stream = through(function(data) { | |
var self = this; | |
self.resume(); | |
self.emit('data', data); | |
}); | |
var bundle = browserify(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules | |
node_modules/* | |
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* WebRTC consist of a few moving pieces | |
- A signal mechanism for peers | |
- A signal mechanism to send offers & answers | |
- A simplified peerConnection function | |
*/ | |
var uuid = require("node-uuid") | |
, assert = require("assert") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var convoy = require('convoy-stream'); | |
var split = require('event-stream').split | |
var through = require('through'); | |
var header = convoy(); | |
var h = header.createStream(); | |
h.write('beep\n'); | |
var _header = convoy() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http') | |
function log (str) { | |
console.log('' + str) | |
} | |
http.get({host: 'localhost', port:6666, path: '/xhr'}, function (res) { | |
res.on('data', log) | |
res.on('end', log) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//npm install http-proxy [email protected] | |
var server = require("http").createServer(function(req, res) { | |
res.writeHead(200, {"content-type": "text/html"}); | |
res.end("<html><body><script src='/socket.io/socket.io.js'></script>\ | |
<script>\ | |
var socket = new io.Socket(null, {transports: ['xhr-multipart']});\ | |
socket.connect();\ | |
</script></body></html>"); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http') | |
, httpProxy = require('http-proxy'); | |
httpProxy.createServer(function (req, res, proxy) { | |
// | |
// Put your custom server logic here | |
// | |
proxy.proxyRequest(req, res, { | |
host: 'localhost', | |
port: 9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[api]: New apis / changes to apis | |
[test]: Update test/* files | |
[dist]: Changes to submodules, version bumps, updates to package.json | |
[minor]: Small changes | |
[doc]: Updates to documentation | |
[ux]: Updates to UX | |
[fix]: Bug fixes | |
[bin]: Update binary scripts associated with the project | |
[merge]: Resolved git merge from upstream or otherwise | |
[refactor]: Refactor of existing code with no external API changes |
NewerOlder