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
| node.js:275 | |
| throw new Error("Cannot find module '" + request + "'"); | |
| ^ | |
| Error: Cannot find module './build/default/pcap_binding' | |
| at loadModule (node.js:275:15) | |
| at require (node.js:411:14) | |
| at Object.<anonymous> (/usr/local/lib/node/.npm/pcap/0.2.1/package/pcap.js:8:18) | |
| at Module._compile (node.js:461:23) | |
| at Module._loadScriptSync (node.js:468:10) | |
| at Module.loadSync (node.js:338:12) |
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
| root@PAF:~/webroot/node.modules/node_pcap# node-waf configure build | |
| Checking for program g++ or c++ : /usr/bin/g++ | |
| Checking for program cpp : /usr/bin/cpp | |
| Checking for program ar : /usr/bin/ar | |
| Checking for program ranlib : /usr/bin/ranlib | |
| Checking for g++ : ok | |
| Checking for node path : ok /home/paf/.node_libraries | |
| Checking for node prefix : ok /usr/local/lib/node/.npm/nave/0.0.6/package/installed/0.2.1 | |
| 'configure' finished successfully (0.064s) | |
| Waf: Entering directory `/home/paf/webroot/node.modules/node_pcap/build' |
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
| paf@PAF:~$ npm install pcap | |
| npm info it worked if it ends with ok | |
| npm info version 0.2.0 | |
| npm info install pcap@0.2.1 | |
| npm info install pcap@0.2.1 | |
| Checking for program g++ or c++ : /usr/bin/g++ | |
| Checking for program cpp : /usr/bin/cpp | |
| Checking for program ar : /usr/bin/ar | |
| Checking for program ranlib : /usr/bin/ranlib | |
| Checking for g++ : ok |
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
| Not root: | |
| paf@PAF:~$ npm install pcap | |
| npm info it worked if it ends with ok | |
| npm info version 0.2.0 | |
| npm ERR! Error: Failed to make /usr/local/lib/node/.npm/.tmp while ensuring /usr/local/lib/node/.npm/.tmp | |
| npm ERR! EACCES, Permission denied '/usr/local/lib/node/.npm/.tmp' | |
| npm ERR! at MKDIRCB (/usr/local/lib/node/.npm/npm/0.2.0/package/lib/utils/mkdir-p.js:33:29) | |
| npm ERR! at cb (/usr/local/lib/node/.npm/npm/0.2.0/package/lib/utils/graceful-fs.js:28:9) | |
| npm ERR! at node.js:764:9 | |
| npm ERR! try running: 'npm help install' |
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
| root@PAF:~/webroot/node.modules/node_pcap# node-waf configure build | |
| Checking for program g++ or c++ : /usr/bin/g++ | |
| Checking for program cpp : /usr/bin/cpp | |
| Checking for program ar : /usr/bin/ar | |
| Checking for program ranlib : /usr/bin/ranlib | |
| Checking for g++ : ok | |
| Checking for node path : ok /home/paf/.node_libraries | |
| Checking for node prefix : ok /usr/local/lib/node/.npm/nave/0.0. 6/package/installed/0.2.1 | |
| 'configure' finished successfully (0.065s) | |
| Waf: Entering directory `/home/paf/webroot/node.modules/node_pcap/build' |
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 sys = require('sys'), | |
| http = require('http'), | |
| count = 0; | |
| handshakeSite = http.createClient(80, 'ws30.sync.skoreit.com'); | |
| handshakeRequest = handshakeSite.request('POST', '/request.ashx?key=11111111-1111-1111-1111-111111111111&token=1284514994201', { | |
| 'host': 'ws30.sync.skoreit.com', | |
| 'Content-type': 'text/json; charset=utf-8' | |
| }); | |
| handshakeJSON = [{ |
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
| events:12 | |
| throw arguments[1]; | |
| ^ | |
| TypeError: Second argument should be a buffer | |
| at Client._writeImpl (net:300:14) | |
| at Client._writeOut (net:731:25) | |
| at Client.write (net:664:17) | |
| at outgoingFlush (http:688:18) | |
| at Client.<anonymous> (http:909:7) | |
| at Client.emit (events:26:26) |
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 sys = require('sys'), | |
| http = require('http'); | |
| auctionSite = http.createClient(80, 'ws30.sync.skoreit.com'); | |
| auctionRequest = auctionSite.request('POST', '/request.ashx?key=11111111-1111-1111-1111-111111111111&token=1284514994201', { | |
| 'host': 'ws30.sync.skoreit.com', | |
| 'Content-type': 'text/json; charset=utf-8' | |
| }); | |
| handshakeJSON = [{"channel": "/meta/handshake", "id": 0, "supportedConnectionTypes": [ "long-polling", "callback-polling"], "version": "1.0"}]; | |
| console.log(handshakeJSON); |
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
| Node repl: | |
| node> var object = {"2":"first","1":"second","3":"third"} | |
| node> console.log(object) | |
| { '1': 'second', '2': 'first', '3': 'third' } | |
| node> | |
| Firebug console: | |
| var object = {"2":"first","1":"second","3":"third"} | |
| console.log(object); |
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
| require.paths.unshift('lib'); | |
| require('express'); | |
| require('express/plugins'); | |
| redisclient = require('redis-node-client/lib/redis-client'); | |
| Parallel = require('parallel').Parallel; | |
| redis = redisclient.createClient(); | |
| sys = require('sys'); | |
| configure(function () { | |
| use(Logger); |