add mock data upload
This commit is contained in:
@@ -108,10 +108,11 @@ public class SocketManager implements IMogoCloudSocketManager {
|
||||
@Override
|
||||
public void sendMsg(String appId, int headerType, MsgBody body, IMogoCloudSocketMsgAckListener listener) {
|
||||
Logger.d(TAG, "sendMsg msgId : " + body.getMsgId());
|
||||
final byte[] pb = convertToPBBytes(body.getMsgType(), body.getContent());
|
||||
if (cloudClientConfig.isThirdLogin()) {
|
||||
ThirdSocketManager.getInstance().sendMsg(appId, body.getContent(), headerType, true, body.getMsgId());
|
||||
ThirdSocketManager.getInstance().sendMsg(appId, pb, headerType, true, body.getMsgId());
|
||||
} else {
|
||||
InternalSocketManager.getInstance().sendMsg(body.getContent(), headerType, true, body.getMsgId());
|
||||
InternalSocketManager.getInstance().sendMsg(pb, headerType, true, body.getMsgId());
|
||||
}
|
||||
mAckListeners.put(body.getMsgId(), listener);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.zhidao.socket.CallbackManager;
|
||||
import com.zhidao.socket.SocketClient;
|
||||
import com.zhidao.socket.SocketConfig;
|
||||
|
||||
import static com.mogo.cloud.socket.SocketServicesConstants.SOCKET_CHANNEL_ID;
|
||||
import static com.mogo.cloud.socket.SocketServicesConstants.TAG;
|
||||
import static com.mogo.cloud.socket.SocketServicesConstants.getEnvironment;
|
||||
|
||||
@@ -71,7 +72,7 @@ public class ThirdSocketManager implements Callback {
|
||||
int headerType,
|
||||
boolean ack,
|
||||
long msgId) {
|
||||
SocketClient.getInstance().sendData(appId, MogoCommon.Product.mogoBussiness.getNumber(), payload, headerType, ack, msgId);
|
||||
SocketClient.getInstance().sendData(SOCKET_CHANNEL_ID, MogoCommon.Product.mogoBussiness.getNumber(), payload, headerType, ack, msgId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user