j2me客户端连接过早断开?(急)
大家帮忙想想.
j2me客户端有没有可能过早的断开连接?
如果有这种可能的话,该怎么解决这个问题.
我的连接代码如下:
客户端:
hc = (HttpConnection) Connector.open(url);
hc.setRequestMethod(HttpConnection.POST);
hc.setRequestProperty("User-Agent", "Profile/MIDP-2.0 Configuration/CLDC-1.1");
hc.setRequestProperty("Content-Language", "en-CA");
hc.setRequestProperty("Content-Type", "application /x-www-form-urlencoded");
hc.setRequestProperty("Connection", "Keep-Alive");
dos = new DataOutputStream(hc.openOutputStream());
dos.writeUTF(strSend);
服务器端:(lotus)
is = request.getInputStream();
dis = new DataInputStream(is);
recdata=dis.readUTF();
服务器配置如下:
1G的内存,cpu intel 2.4GHz.