This file contains hidden or 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
then in client code, a JS var is exposed with the passed in token | |
and the first thing it does upon connection si sending the token |
This file contains hidden or 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
#!/usr/bin/env node | |
var cp = require('child_process'); | |
var sys = require ('sys') | |
var fs = require ('fs') | |
var lines = require ('lines') | |
var nextAddress; | |
var i=1, j=1, k=1; | |
nextAddress = function() { | |
++k; |
This file contains hidden or 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
From 65c619b6c0e988406e4d338ecd7cb49e472c5b51 Mon Sep 17 00:00:00 2001 | |
From: Florent Jaby <[email protected]> | |
Date: Wed, 28 Jul 2010 13:09:27 +0200 | |
Subject: [PATCH] Added an experimental support for lines with streams | |
+ added function sys.lines(stream) which sets up a few utilities for streams | |
++ adds a function stream.writeln(string) which is a shorthand for stream.write(string + "\n") | |
++ add a listener on data events on this stream | |
+++ do nothing if the encoding is binary | |
+++ bufferize characters other than "\n" |
NewerOlder