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

Method finalize

src/GraphServer/GraphServer.java:80–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78 }
79
80 public void finalize()
81 {
82 String message = NetworkProtocol.DISCONNECT+"";
83 sendMessageAll(message);
84
85 ListIterator<ClientConnection> itr = clients.listIterator();
86
87 while(itr.hasNext())
88 {
89 ClientConnection client = itr.next();
90
91 client.disconnect();
92 }
93
94 acceptingConnections = false;
95 try
96 {
97 serverSocket.close();
98 }
99 catch (IOException e)
100 {
101 e.printStackTrace();
102 }
103 }
104
105 public synchronized void addClient(Socket socket)
106 {

Callers 3

stopMethod · 0.80
finishGameMethod · 0.80
stopMethod · 0.80

Calls 3

sendMessageAllMethod · 0.95
disconnectMethod · 0.95
closeMethod · 0.80

Tested by

no test coverage detected