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
Listener.prototype.cleanup = function(){ | |
var k = Object.keys(this.clients), | |
i = k.length, | |
clientCount = i, | |
readyStates = {}, | |
requestStates = {}; | |
while( i-- ){ | |
if(this.clients[k[i]]){ | |
if( this.clients[k[i]].connection && !!this.clients[k[i]].connection.readyState ){ |
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
Caught exception: Error: ETIMEDOUT, Connection timed out | |
[ 'Error: ETIMEDOUT, Connection timed out' | |
, ' at IOWatcher.callback (net:854:22)' | |
, ' at node.js:764:9' | |
] | |
Caught exception: Error: ETIMEDOUT, Connection timed out | |
[ 'Error: ETIMEDOUT, Connection timed out' | |
, ' at IOWatcher.callback (net:854:22)' | |
, ' at node.js:764:9' | |
] |
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
io.on("disconnect", function(){ | |
setTimeout(function(){ | |
if( io.connected ){ | |
return io.fire("reconnect"); | |
} | |
ignite.io.connect(); | |
setTimeout( arguments.callee, 15000 ) | |
}, 15000 ); | |
}); |
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
# project noname (0.0.1) configured on Fri Nov 5 20:44:35 2010 by | |
# waf 1.5.16 (abi 7, python 20601f0 on darwin) | |
# using /usr/local/bin/node-waf configure build | |
# | |
---------------------------------------- | |
Checking for program g++ or c++ | |
find program=['g++', 'c++'] paths=[] var='CXX' | |
-> '/usr/bin/g++' |
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
var http = require("http"), io = require("socket-io") | |
.. do your require stuff | |
var server = http.createServer(function(req,res){ | |
.. determine the location, and if its the same use the socket.io broadcast fn to send a message | |
if( req url is the same as /ping ) | |
socketio.broadcast("pong") | |
}); |
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
{ '0': 'restart', | |
'1': 'ws', | |
'2': null, | |
'3': | |
{ stdout: | |
{ path: 'log/ws-out.log', | |
fd: 8, | |
writable: true, | |
flags: 'a+', |
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
[{"name":"Adobe Photoshop CS2","category":"Digital Imaging","boximage":"images/photoshop.gif","bkgimage":{},"descheader":"The professional standard in desktop digital imaging","desc":"Adobe® Photoshop® CS2 software, the professional image-editing standard and leader of the Photoshop digital imaging line, delivers more of what you crave. Groundbreaking creative tools help you achieve extraordinary results. Unprecedented adaptability lets you custom-fit Photoshop to the way you work. And with more efficient editing, processing, and file handling, there's no slowing you down.","features":{"feature":["Revolutionary Vanishing Point","Multiple layer control","Smart Objects","Multi-image digital camera raw file processing","Image Warp"]}},{"name":"Adobe Illustrator CS2","category":"Print Publishing","boximage":"images/illustrator.gif","bkgimage":{},"descheader":"Vector graphics reinvented","desc":"Adobe® Illustrator® CS2 software gives you new creative freedom that lets you realize your ideas quickly |
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
// Include required modules | |
var crypto = require( "crypto" ) | |
, http = require( "http" ) | |
, fs = require( "fs" ); | |
// Build our default app, just like would normally do | |
var app = http.createServer(function (req, res) { | |
res.writeHead(200, { "Content-Type": "text/plain" } ); | |
res.end( "Double http server, over http and https\n" ); | |
}); |
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
var mongo = require("mongodb"); | |
var connection = new mongo.Db( "database-namehere", new mongo.Server( "the host of your db", "the port number" ) ); | |
// open the connection | |
connection.open(function(err){ | |
if( err ) console.error( err ); | |
connection.authenticate( "user", "password", function( err ){ | |
if( err ) console.error( err ); |
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
<!doctype html> | |
<html> | |
<head> | |
<title>socket.io client test</title> | |
<script src="/json.js"></script> <!-- for ie --> | |
<script src="/socket.io/socket.io.js"></script> | |
</head> | |
<body> | |