use of im.actor.core.network.parser.RpcScope in project actor-platform by actorapp.
the class ApiBroker method processUpdate.
private void processUpdate(long authId, byte[] content) {
if (authId != currentAuthId) {
return;
}
ProtoStruct protoStruct;
try {
protoStruct = ProtoSerializer.readUpdate(content);
} catch (IOException e) {
e.printStackTrace();
Log.w(TAG, "Broken mt update");
return;
}
int type = ((Push) protoStruct).updateType;
byte[] body = ((Push) protoStruct).body;
RpcScope updateBox;
try {
updateBox = parserConfig.parseRpc(type, body);
} catch (IOException e) {
e.printStackTrace();
Log.w(TAG, "Broken update box");
return;
}
// Log.w(TAG, "Box: " + updateBox + "");
callback.onUpdateReceived(updateBox);
}
Aggregations