By Ilya Grigorik on December 22, 2009 WebSockets are one of the most underappreciated innovations in HTML5. Unlike local storage, canvas, web workers, or even video playback, the benefits of the WebSocket API are not immediately apparent to the end user. In fact, over the course of the past decade we have invented a dozen technologies to solve the problem of asynchronous and bi-directional communi
MacにChromeを入れたことだし、HTML5のWebSocketでChatを作ってみました。サーバがgolangで作っています。クライアント側のコードは、こんな感じです。 <html> <head><title>Web Socket Chat</title></head> <body> <script> var ws = new WebSocket("ws://127.0.0.1:1972/chat"); ws.onopen = function() { }; ws.onmessage = function(message) { var txtNode = document.createTextNode(message.data); var brNode = document.createElement('br'); var cnode = document.getElementByI
HTML5のWeb Socketを、Flashの力を借りて実装してみました。 gimite / web-socket-js - GitHub Web SocketはHTML5に入る(予定の?)機能で、JavaScriptから生のTCP Socketに近いもの*1を使えるようにしよう、というものです。 2009年11月頃にChromeの開発版で実装されましたが、ほかのブラウザでは未実装です。このライブラリを使うと、すべてのブラウザで(Flashが入っていれば)Web Socketが使えるようになります。 使い方はこんな感じです。 // おまじないその1: JavaScriptライブラリの読み込み <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript" src="web
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く