第三章中的示例用于功能测试一般没有问题,但当压力上来或者发送大报文时,就会存在粘包/拆包问题。
这时就需要使用LineBasedFrameDecoder+StringDecoder
client端请求改为连续的100次
package com.xiaobing.netty.fourth;
import java.net.SocketAddress;
imp...
分类:
Web程序 时间:
2014-09-21 12:13:10
阅读次数:
344
本例以client端发送请求,server端返回当前时间...
分类:
Web程序 时间:
2014-09-21 10:52:00
阅读次数:
253
最近使用netty-4.0.23.Final版本编写服务端代码,有个获取客户端代码的小需求,以前使用servlet开发时很机械的就:StringipAddr="0.0.0.0";
if(reqest.getHeader("X-Forwarded-For")==null){
ipAddr=reqest.getRemoteAddr();
}else{
ipAddr=req.getHeader("X-Forwarded-For");
}..
分类:
Web程序 时间:
2014-09-21 04:29:50
阅读次数:
629
初学struts,在学习动态方法调用的时候,写的链接为添加学生但是在点击链接时,出现下面这样的错误提示信息:There is no Action mapped for namespace [/user] and action name [user!add] associated with conte...
分类:
其他好文 时间:
2014-09-21 02:26:29
阅读次数:
195
一. JSP/Servlet 中路劲问题1.服务器端的地址: “/”表示到http://localhost:8080/webapp/2.客户端地址: 在客户端的链接、表单请求路径中,“/”表示http://localhost:8080/;对于表单中的action的路径,如果是向Servlet发请求....
分类:
Web程序 时间:
2014-09-21 00:22:09
阅读次数:
290
http://www.usr.cc/forum.php/static/image/smiley/tiger/archiver/forum.php?mod=viewthread&action=printable&tid=51827本文将达芬奇开发分为四个角色的工作,实则也就是达芬奇DSP开发的四个步骤...
分类:
其他好文 时间:
2014-09-20 23:04:49
阅读次数:
396
Ext.override(Ext.form.Action.Submit,{ processResponse : function(response){ this.response = response; var data = response.responseText; if(data...
分类:
Web程序 时间:
2014-09-20 17:15:39
阅读次数:
182
笔者通过在路由器上搭建Provioxy代理服务器来实现过滤通过其对网页,并植入相应对广告。
废话不多说直接上实验:
第一步:
编译OpenWrt固件-选择Privoxy
第二步:
配置user.filter, user.action, config文件。
config文件中需要指定监听都地址与端口号
0.0.0.0:8118 #所有的。
permit-access 0.0.0.0/...
分类:
其他好文 时间:
2014-09-20 15:25:07
阅读次数:
229
显示网页: Uri uri = Uri.parse("http://www.google.com"); Intent it = new Intent(Intent.ACTION_VIEW,uri); startActivity(it);显示地图: Uri uri = Uri.parse("ge...
分类:
移动开发 时间:
2014-09-20 14:02:37
阅读次数:
257
Give this a shot. In Visual Studio 2010, open your app.config or web.config file. Go to the XML menu and select Create Schema. This action should crea...
分类:
Web程序 时间:
2014-09-20 03:32:36
阅读次数:
231