2011年4月18日

erlang websocket

摘要: goole chrome支持websocket了,试了一下,下面给我的学习代码分享给大家,废话少说,直接贴代码客服端代码,是从网上找的View Code 1 <html> 2 <head> 3 <title>WebSocket在线聊天</title> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <style> 6 html,body{font:normal 0.9em arial, 阅读全文

posted @ 2011-04-18 17:24 wuping 阅读(1322) 评论(0) 推荐(0)

erlang 连接php-fpm

摘要: 前端时间在网上看见erlang 连接php-fpm的例子,自己跟到弄了一下,下面给我调试后的代码贴出来我修正了原来代码的2处bug:1、参数超过128字符出错2、当php返回超过1024字节时候出错文件名fastcgi.erl-module(fastcgi).-compile(export_all).do_request(Argv) -> Env = [ {"SCRIPT_FILENAME","E:/phpGame/game/gateway.php"}, {"websocket",Argv} ], io:format(" 阅读全文

posted @ 2011-04-18 16:45 wuping 阅读(738) 评论(0) 推荐(0)

导航