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

Method run

src/RoomServer/GlobalClient.java:318–358  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

316 }
317
318 public void run()
319 {
320 while(running)
321 {
322 try
323 {
324 String message = connection.readMessage();
325
326 if(message == null)
327 {
328 disconnect();
329 }
330 else
331 {
332 handleMessage(message);
333
334 if(checkStayAliveTime())
335 {
336 sendKeepAlive();
337 }
338 }
339 }
340 catch (SocketTimeoutException e)
341 {
342 if(checkTimeout())
343 {
344 disconnect();
345 }
346 else
347 {
348 sendKeepAlive();
349 }
350 }
351 catch (IOException e)
352 {
353 e.printStackTrace();
354
355 disconnect();
356 }
357 }
358 }
359}

Callers

nothing calls this directly

Calls 6

disconnectMethod · 0.95
handleMessageMethod · 0.95
checkStayAliveTimeMethod · 0.95
sendKeepAliveMethod · 0.95
checkTimeoutMethod · 0.95
readMessageMethod · 0.80

Tested by

no test coverage detected