-
Notifications
You must be signed in to change notification settings - Fork 434
Disconnection
徐昊 edited this page Nov 10, 2018
·
2 revisions
ConnectionInfo info = new ConnectionInfo("104.238.184.237", 8080);
IConnectionManager manager = OkSocket.open(info);
manager.disconnect();
ConnectionInfo info = new ConnectionInfo("104.238.184.237", 8080);
IConnectionManager manager = OkSocket.open(info);
manager.disconnect(new CustomException("custom exception"));
ATTENTION: If you want to unregister receiver, you'd better call
unRegisterReceiver
method in the callbackonSocketDisconnection
. Otherwise you might never receivedonSocketDisconnection
callback