This domain may be for sale!

今回はPythonのtwistedで、HTML5のWebSocketを使って複数クライアントのマルチチャットのデモを実現する方法を自分のメモ代わりに書いておこうと思います。 前書き HTML5でwebSocketが導入されて、Safari5やらChromeやらで、利用可能になっています。しかしながら、対応サーバがたくさんあるわけでもないので、静観しておりました(本業がWeb関係ではないもので)。しかし、とりあえず、以下を読み、 @IT 第1回 node.jsの衝撃とwebSocketが拓く未来 そんでもって、以下を読みました。 naoyaのはてなダイアリー:Mojolicious::Lite で webSocket を使ったチャットを作る で、 node.js を眺めてみて、おぉ。。。なるほど。。。でもさ、なんか、このイベント処理モデルどっかで見たことが……。この既視感に、とても興味を覚え
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message Hello, In my project I need not only read from environ['wsgi.input'] but also write in the opposite direction too. After some hours of goooogling I supposed there is no any way to obtain output file object. So, I've added just one line at httpserver.py:210 ,'wsgi.
tornado は git clone してきて python setup.py install したものを使っています。 コードは tornade/websocket.py に書いてあったコメントそのままです。なんかコメント少し間違ってますね、send_message って書いてますが write_message ですね。 さて、これの問題としては今繋がっているであろう connect 一覧がとれないということです。open した時に何かしらグローバル変数のリストで持ってるのがスマートなのかな。でも close したときに気づけないとリストの中身が増え続けるので微妙。 さて、どうしたものか。 main.py # vim: fileencoding=utf8 import time import datetime import tornado.httpserver import torna
I have been playing around with HTML 5 Web Sockets for a personal project. The Web Sockets API enables web browsers to maintain a bi-directional communication channel to a server, which in turn makes implementing real-time web sites about 1000% easier than it is today. Currently, the only reasonable technical facility available to browsers to communicate to web servers is XMLHttpRequest. Sites tha
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く