サーバのテストをするときなどに未使用のポートを使ってテストコードを走らせたい、というときがあって、PerlだとTest::TCPにempty_portというのがあって簡単に取得出来る。 $ perl -MTest::TCP -E 'say Test::TCP::empty_port' 10256引数を与えない場合は毎回違う値になるけれど、基本的に必ず空いているポート番号が返ってくる。 nodeでも同じようなのがあればいいな、と思ったのだけど多分ないのでTest::TCPを参考に自分で書いてみた。 exports.empty_port = function(callback) { port = 10000 + Math.floor(Math.random() * 1000); var net = require('net'); var socket = new net.Socket(); v
htracr htracr is a packet sniffer and visualisation tool for HTTP. It does not give you a score, grade, or hold your hand when you're crying because your site is so damn slow, but it will give you unparalleled insight into what's actually happening on the wire between your browser and the Web. Installing htracr First you'll need Node and its package manager, npm. You'll also need a modern Web brow
As most of you probably know, the Slashdot Effect is caused by someone posting a link to Slashdot which triggers massive amounts of inbound requests that melts the web server. These days it could be Twitter, Reddit, HN, etc. To quote the Wikipedia: Few definitive numbers exist regarding the precise magnitude of the Slashdot effect, but estimates put the peak of the mass influx of page requests at
OK, I hear you. Capturing packets is hard and best left to kernel hackers, assembly language programmers, and black hat security researches. If you just want to make things for the web using node.js, why should you care? Pulling packets off the network can show you what your computers are saying to each other without disrupting the flow of or changing any applications. Packet capture is a fantasti
Socket.IOBidirectional and low-latency communication for every platform PerformantIn most cases, the connection will be established with WebSocket, providing a low-overhead communication channel between the server and the client. ReliableRest assured! In case the WebSocket connection is not possible, it will fall back to HTTP long-polling. And if the connection is lost, the client will automatical
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く