You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
一般論として、全二重の通信プロトコルを実装するにあたっては、いくつか注意すべき点があって、具体的には、到達確認と切断シーケンスについて定めておかないと、送達されたはずのメッセージがロストしていたり、切断タイミングによってエラーが発生*1したりする。 具体例をあげると、たとえばTCP/IPにおいてshutdown(2)を用いずに、いきなりclose(2)を呼んでいると、read(2)やwrite(2)がエラー(ECONNRESET)を返す場合がある。 翻って、WebSocket (RFC6455)の場合はどうなってるか? だいたい以下のような感じっぽい。 ws.close()が呼び出されるとWebSocketをCLOSING状態に変更し、Closeフレームを送信する ws.onmessageはWebCosketがCLOSING状態にある間も呼ばれるかもしれない*2 相手からCloseフレーム
WebSocketが一番速いアプリケーションサーバはどれだ?:Tomcat、Jetty、Socket.IO/Node.js性能比較(1/3 ページ) はじめに 2012年の10月にWindows 8が発売され、そこに搭載されたInternet Explorer(以下、IE) 10ではHTML5の機能が利用できるようになりました。また、2013年の2月にWindows 7版のIE 10もリリースされ多くのユーザーがHTML5の恩恵を受けられるようになりました。 HTML5の機能の多くは、Webブラウザ側で実装されれば、HTMLやCSSを適切に記述することで利用が可能です。しかし、今回取り上げるWebSocketはサーバ側でも機能の実装が必要です。このため、WebSocketを利用する場合はWebブラウザだけではなくサーバを選ぶ必要があります。 WebSocketそのものの技術的な解説は、以下
ひかりTV独自のスマートテレビリモコンの接続方法はWebSocketを用いた常時接続だ。その仕組みと開発意図を聞いた。 次世代のテレビを表すキーワードとして話題の「スマートテレビ」。いろいろなポジションの人が、それぞれに我田引水な解釈を披露する中、本を読んだり講演を聞いても、ふわふわとした印象だけが残り、「スゴそうだけど良く分からない」という感覚だけが通奏低音のように脳内再生される状態が続いていた。 だが、2012年9月に登場したひかりTVの「りもこんプラス」を、遅ればせながら実際に触る機会を得た今、「スマートテレビってこういことかも!」とユウレカ(古典ギリシャ語で「私は見つけた」「分かったぞ」といった意味)した自分がいる。 「りもこんプラス」というのは、セカンドスクリーンとして、iPadやAndroidタブレットをテレビのリモコン代わりに使うことのできる仕組みなのだが、スマートテレビのあ
2012年3月12日月曜日 Socket.IOって結局何なの!?と思いながらtransportを変えるとどうなるのか試したりした Socket.IOって結局何なの!? 前回、"Socket.IOって何だろうと思っていじってたらチャットみたいなのができた"では、、チャットのようなものができたのですが、Socket.IOって何なのかよくわからないのでちゃんと調べることにした。完全に調べてるのをつらつら書いてるので全然整理できてないし間違ってるところ沢山あると思います。 とりあえず、Socket.IO API解説 が非常〜にわかりやすくて感謝です。「よくわからない」といってもよくわからない箇所ってすごく色々あるのですが、まずHTTPサーバとnodeアプリケーションの棲み分け部分の作法がわからない。双方向通信がいらない単純なhtmlや画像、JavaScriptのコンテンツ受け渡し部分については
追記 11/7/31 Socket.IO v0.7 解説を最初に途中までで出す。 11/8/1 だいたい全部新機能なので '(新機能)' って書くのやめた。 11/8/4 オプションの設定周りを追記 11/8/6 認証周りを追記 11/8/12 スタンドアローンのサンプルを追記 11/9/27 Socket.IO v0.8 対応について追記 11/9/27 タイトルを Socket.IO API 解説に変更 11/9/27 翻訳サイトリンク追加 公式マニュアル翻訳サイト そういえば公式サイトの翻訳をフォークしたリポジトリで、それなりの更新頻度でやってます。 リポジトリの wiki も地味に訳しててこっちは結構役に立ちます。本記事と合わせてどうぞ。 本家 http://socket.io/ 翻訳ページ http://jxck.github.com/socket.io wiki https:/
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
node.js + socket.io はリアルタイムwebアプリを作るのにとても良い組み合わせだと思っています。 しかし、基本的にsocket.ioのconnectionはhttpのsessionと関連が無いので、例えばそのconnectionがログインしているユーザのものかその他のユーザのものか区別がつかない。以前はSessionWebSocketを使ってそれを判別するようにしていたのだけど、残念なことに残念なのでコレはもう使いたくない。。 そこでclientから最初にcookieを送信してもらって、そこからclientのsessionを識別する、という方法がある、と以前@masahirohさんに教えていただきました。 *1 session共有方法 クライアント側では下記のように接続時にcookieを送信するようにしておき、 var socket = new io.Socket();
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く