in multiplayer game have 2 opponents. how can 1 peer notified when other 1 have network problem/disconnection? expecting either onpeerleft
or onpeersdisconnected
fired, nothing!
actually i'm going implement kind of ping mechanism if 1 peer not receive ping message within specified time can throw user (a dialog specifying opponent disconnected.)
as alternative, there callback listen when kind of problem appens?
on disconnected peer i'm using onrealtimemessagesent
callback detect if peer cannot send data, follow:
@override public void onrealtimemessagesent(int statuscode, int token, string arg2) { //f peer can't send data if (statuscode == gamesclient.status_real_time_message_send_failed) { //here show error dialog , move out of game } }
on other peer, no other callbacks raised (such onpeerleft
or onpeersdisconnected
)
any suggestion? in advance!
sounds might not calling setroomstatusupdatelistener(roomstatusupdatelistener) before calling builder.build()
edit: builder roomconfig.builder
Comments
Post a Comment