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

Method run

src/GraphServer/GraphServer.java:157–187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155 }
156
157 public void run()
158 {
159 acceptingConnections = true;
160
161 while(acceptingConnections)
162 {
163 try
164 {
165 Socket socket = serverSocket.accept();
166
167 if(acceptingConnections)
168 {
169 addClient(socket);
170 }
171 else
172 {
173 ClientConnection client = new ClientConnection(this, socket);
174
175 String message = NetworkProtocol.GAME_FULL+"";
176 client.sendMessage(message);
177
178 client.disconnect();
179 }
180 }
181 catch (IOException e)
182 {
183 //System.out.println("Server socket error.");
184 //e.printStackTrace();
185 }
186 }
187 }
188
189 private void sendMessageAll(String message)
190 {

Callers

nothing calls this directly

Calls 3

addClientMethod · 0.95
sendMessageMethod · 0.95
disconnectMethod · 0.95

Tested by

no test coverage detected