Config multi or singlepalyer - A single player game will only use the loopback code.
(boolean multiplayer)
| 203 | * Config multi or singlepalyer - A single player game will only use the loopback code. |
| 204 | */ |
| 205 | public static void Config(boolean multiplayer) { |
| 206 | if (!multiplayer) { |
| 207 | // shut down any existing sockets |
| 208 | for (int i = 0; i < 2; i++) { |
| 209 | if (ip_sockets[i] != null) { |
| 210 | ip_sockets[i].close(); |
| 211 | ip_sockets[i] = null; |
| 212 | } |
| 213 | } |
| 214 | } else { |
| 215 | // open sockets |
| 216 | OpenIP(); |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | /* |
| 221 | * Socket |
no test coverage detected