MCPcopy Create free account
hub / github.com/catabriga/graphwar / disconnect

Method disconnect

src/Graphwar/GlobalClient.java:573–592  ·  view source on GitHub ↗
(boolean kick)

Source from the content-addressed store, hash-verified

571 }
572
573 private void disconnect(boolean kick)
574 {
575 if(kick && running)
576 {
577 ((GlobalScreen)graphwar.getUI().getScreen(Constants.GLOBAL_ROOM_SCREEN)).showDisconnectMessage("You have been disconnected.");
578 }
579
580 running = false;
581
582 ((GameScreen)graphwar.getUI().getScreen(Constants.GAME_SCREEN)).refreshGlobalButton();
583
584 try
585 {
586 connection.close();
587 }
588 catch (IOException e)
589 {
590 e.printStackTrace();
591 }
592 }
593
594 public void sendMessage(String message)
595 {

Callers 2

stopMethod · 0.95
runMethod · 0.95

Calls 5

showDisconnectMessageMethod · 0.80
getScreenMethod · 0.80
getUIMethod · 0.80
closeMethod · 0.80
refreshGlobalButtonMethod · 0.45

Tested by

no test coverage detected