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

Method tryConnection

src/GlobalServer/GlobalServer.java:188–203  ·  view source on GitHub ↗
(Room room)

Source from the content-addressed store, hash-verified

186 }
187
188 private boolean tryConnection(Room room)
189 {
190 try
191 {
192 Connection connection = new Connection(room.getIp(), room.getPort());
193 String message = NetworkProtocol.DISCONNECT+"";
194 connection.sendMessage(message);
195 connection.close();
196 return true;
197 }
198 catch (IOException e)
199 {
200 e.printStackTrace();
201 return false;
202 }
203 }
204
205 private void sendRoomInvalid(LobbyPlayer player)
206 {

Callers 1

handleMessageMethod · 0.95

Calls 4

sendMessageMethod · 0.95
closeMethod · 0.95
getIpMethod · 0.45
getPortMethod · 0.45

Tested by

no test coverage detected