Skip to content

Kick The Client Offline

徐昊 edited this page Nov 12, 2018 · 1 revision
  • You should find the client which you want to kick offline and as following code.
     IClientPool pool = mServerManager.getClientPool();
     IClient client = pool.findByUniqueTag(/* the client name's you want to kick offline */);
     //you can call disconnect with exception.
     client.disconnect(new Exception("exception msg"));
     //or you just disconnect it.
     client.disconnect();

That's Done !