| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> perl >> yong Perl xie bu shua ping de liao tian shi yuan li fen xi

yong Perl xie bu shua ping de liao tian shi yuan li fen xi

2008-05-19 06:25:43 编辑來源:互联网 评论
 
 
 
本文为【用Perl写不刷屏的聊天室原理分析】的拼音翻译版
  zao xian lai wu shi , wo ye shuo shuo bian xie bu shua ping de liao tian shi 。
  shou xian yao shuo , bian xie zhen zheng hao de liao tian shi yi jing chao chu le CGI de fan chou , yao qiu bu jin dui yu yan er qie dui cao zuo xi tong he wang luo xie yi you yi ding de le jie , xu yao yi xie jing yan de ji lei 。 jian dan de shuo jiu shi bian xie duan kou shou hu cheng xu , zhe li qian che dao socket bian cheng , jin cheng jian jiao hu ,( er zhe dou shi bi jiao gu lao de ji shu ), yi ji HTTP xie yi 。 qian mian “ tian shui ” tong zhi yi jing tie chu le zhe bu fen de C dai ma , wo zhi shi shao zuo jie shi 。 liao bo gao shou yi shen 。1.socket bian cheng , li yong UNIX de socket chou xiang gai nian da kai fu wu qi de yi ge mian xiang lian jie de duan kou , deng dai wai bu de lian jie qing qiu 。
  perl yu yan shi yong ming kong jian IO::Socket::INET, zai xin ban ben de perl zhong wo tui jian shi yong HTTP::Daemon pei he HTTP::Request( ke yi jian hua HTTP chu li guo cheng )。2. jin cheng jian jiao hu , zhe shi shi xian bu shua ping de guan jian suo zai ,socket lian jie hou tong chang li yong zi jin cheng wan cheng yu yong hu de ju ti jiao hu gong zuo ( dang client cun zai , zi jin cheng yi zhi yu qi bao chi lian jie , bu shou xian guan bi lian jie ), er fu jin cheng fan hui deng dai qi ta lian jie qing qiu 。 fu jin cheng yu zi jin cheng jian de jiao hu gong zuo tong chang yong guan dao pipe() lai wan cheng , zhe li shi yong dan gong guan dao ji ke , ji fu -〉 zi 。 gong zuo shi zhe yang de : dang you nei rong ti jiao , fu jin cheng jiang ta tong guo guan dao chuan di gei suo you cun zai de zi jin cheng ( tong chang bao cun zai hash zhong ), ran hou zi jin cheng fen bie fa gei ge zi de client. kan qi lai bu nan 。
  zhi de zhu yi de wen ti : yi shi pan duan yong hu client shi fou guan bi lian jie 。 er shi zi jin cheng tui chu hou , bu zhuo $SIG{CHLD} xin hao 。 zhe liang dian hen chong yao , kai fang guo duo de jin cheng , guan dao he jiang da liang de xin hao quan dou reng gei cao zuo xi tong , ta huan shou de le me ? bao cun guan dao de hash ye bu neng yue lai yue da ba ?3.HTTP xie yi , jiu shi fen xi yong hu de HTTP qing qiu , bing qie fan hui HTTP ying da 。
  shou xian kan kan qing qiu shi shen me fang shi ,get huan shi post, dang ran huan you yi xie bu chang yong de 。get chu li qi lai bi jiao jian dan ,post yao tong guo head de xin xi read()body, wang shang dui HTTP ju ti jie gou de chan shu hen duo , wo jiu bu duo shuo le 。 zhi de zhu yi de wen ti : yi ge shi huan xing fu wen ti , xin shou jiu ba ta dou dang zuo \012\015 ji ke 。 ling yi ge shi HTTP1.1 tong lao ban ben zai chu li post shi bu tai yi yang 。 zhang wo le yi shang nei rong , ke yi chang shi bian xie yi ge jian dan de HTTP server, hui hen you man zu gan de ^_^ perl ji cheng le da liang de c de *.h, bian xie shang shu wen ti wan quan ke yi sheng ren , xi jie dou he c hen xiang si , qing guan zhu perl peng you , dui ta you chong fen de xin xin ! shang mian shuo de qian liang dian dou shi gen cao zuo xi tong xiang guan de ,NT huan bu xing , wo zai activeperl5.6 shang shi guo , bing bu xiang chuan shuo de , you hen duo wen ti 。 bu xiu gai dai ma zhi jie zai NT shang shi yong wo men zhi neng qi dai geng wan shan de activeperl le 。 cuo wu zhi chu qing gao shou jiu zheng , gong tong jin bu 。
  【原文】【汉音对照
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
   zao xian lai wu shi , wo ye shuo shuo bian xie bu shua ping de liao tian shi 。    shou xian yao shuo , bian xie zhen zheng hao de liao tian shi yi jing chao chu le CGI de fan chou , yao qiu bu jin dui yu yan er qie dui cao zuo xi tong he wang luo xie yi you yi ding de le jie , xu yao yi xie jing yan de ji lei 。 jian dan de shuo jiu shi bian xie duan kou shou hu cheng xu , zhe li qian che dao socket bian cheng , jin cheng jian jiao hu ,( er zhe dou shi bi jiao gu lao de ji shu ), yi ji HTTP xie yi 。 qian mian “ tian shui ” tong zhi yi jing tie chu le zhe bu fen de C dai ma , wo zhi shi shao zuo jie shi 。 liao bo gao shou yi shen 。1.socket bian cheng , li yong UNIX de socket chou xiang gai nian da kai fu wu qi de yi ge mian xiang lian jie de duan kou , deng dai wai bu de lian jie qing qiu 。   perl yu yan shi yong ming kong jian IO::Socket::INET, zai xin ban ben de perl zhong wo tui jian shi yong HTTP::Daemon pei he HTTP::Request( ke yi jian hua HTTP chu li guo cheng )。2. jin cheng jian jiao hu , zhe shi shi xian bu shua ping de guan jian suo zai ,socket lian jie hou tong chang li yong zi jin cheng wan cheng yu yong hu de ju ti jiao hu gong zuo ( dang client cun zai , zi jin cheng yi zhi yu qi bao chi lian jie , bu shou xian guan bi lian jie ), er fu jin cheng fan hui deng dai qi ta lian jie qing qiu 。 fu jin cheng yu zi jin cheng jian de jiao hu gong zuo tong chang yong guan dao pipe() lai wan cheng , zhe li shi yong dan gong guan dao ji ke , ji fu -〉 zi 。 gong zuo shi zhe yang de : dang you nei rong ti jiao , fu jin cheng jiang ta tong guo guan dao chuan di gei suo you cun zai de zi jin cheng ( tong chang bao cun zai hash zhong ), ran hou zi jin cheng fen bie fa gei ge zi de client. kan qi lai bu nan 。    zhi de zhu yi de wen ti : yi shi pan duan yong hu client shi fou guan bi lian jie 。 er shi zi jin cheng tui chu hou , bu zhuo $SIG{CHLD} xin hao 。 zhe liang dian hen chong yao , kai fang guo duo de jin cheng , guan dao he jiang da liang de xin hao quan dou reng gei cao zuo xi tong , ta huan shou de le me ? bao cun guan dao de hash ye bu neng yue lai yue da ba ?3.HTTP xie yi , jiu shi fen xi yong hu de HTTP qing qiu , bing qie fan hui HTTP ying da 。    shou xian kan kan qing qiu shi shen me fang shi ,get huan shi post, dang ran huan you yi xie bu chang yong de 。get chu li qi lai bi jiao jian dan ,post yao tong guo head de xin xi read()body, wang shang dui HTTP ju ti jie gou de chan shu hen duo , wo jiu bu duo shuo le 。 zhi de zhu yi de wen ti : yi ge shi huan xing fu wen ti , xin shou jiu ba ta dou dang zuo \012\015 ji ke 。 ling yi ge shi HTTP1.1 tong lao ban ben zai chu li post shi bu tai yi yang 。 zhang wo le yi shang nei rong , ke yi chang shi bian xie yi ge jian dan de HTTP server, hui hen you man zu gan de ^_^ perl ji cheng le da liang de c de *.h, bian xie shang shu wen ti wan quan ke yi sheng ren , xi jie dou he c hen xiang si , qing guan zhu perl peng you , dui ta you chong fen de xin xin ! shang mian shuo de qian liang dian dou shi gen cao zuo xi tong xiang guan de ,NT huan bu xing , wo zai activeperl5.6 shang shi guo , bing bu xiang chuan shuo de , you hen duo wen ti 。 bu xiu gai dai ma zhi jie zai NT shang shi yong wo men zhi neng qi dai geng wan shan de activeperl le 。 cuo wu zhi chu qing gao shou jiu zheng , gong tong jin bu 。   
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
清凉一夏_清纯美丽
纯白色小礼服
靓丽可人儿_嘉嘉
我的女神_靓丽女生
主题摄影
贵州,让我欢喜,让我神伤。
莫干山
天平秋色
 
>>返回首页<<
 
 
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
 
©2005- 王朝网络 版权所有