高分求助,一直没做过socket,今天写了个socket连接程序
serverAddress = "socket://121.235.229.105:1000";
try {
server =(SocketConnection) Connector.open(serverAddress);
} catch (IOException ex) {
ex.printStackTrace();
errInfo = "IOException:"+ex.getMessage();
linkStatus = LINKERROR;
return;
}catch(IllegalArgumentException ex1){
ex1.printStackTrace();
errInfo = "IllegalArgumentException:"+ex1.getMessage();
linkStatus = LINKERROR;
return;
}catch(SecurityException ex2){
ex2.printStackTrace();
errInfo = "SecurityException:"+ex2.getMessage();
linkStatus = LINKERROR;
return;
}
这个是连接代码,在线程中完成的,在模拟器上没有问题
但是到我的nokia7610上报symbian os error -4161
200分求助,我的手机卡是中国移动全球通,走的是cmnet路线