mClient = new PomeloClient("192.168.1.169", 3014);
mClient.init();
mClient.request("gate.gateHandler.queryEntry", msg, new DataCallBack() {
@Override
public void responseData(JSONObject msg) {
if(msg.has("error")) {
mClient.disconnect();
//Toast.makeText(getInstance().mContext, "Failed to connect with the Server!", 3000).show();
Log.e(TAG,"Failed to connect with the Server!");
} else {
//Toast.makeText(getInstance().mContext, "The Game is online!", 3000).show();
Log.v(TAG,"The Game is online!");
}
}
});
遇到一个奇怪的问题,还请帮忙解答下!
当我用chatofpomelo服务器和pomelo-androidchat例子来连接的时候一切正常。保持服务器不变,但我用自己的testApp,却发现PomeloClient无法连接服务器,我的调用如下:
mClient = new PomeloClient("192.168.1.169", 3014); mClient.init(); mClient.request("gate.gateHandler.queryEntry", msg, new DataCallBack() {
回调不会被调用,在服务器端console.log也发现query根本没调用,请问还有什么地方需要注意吗?非常感谢!