Hello, can someone help me convert
to that IOException -> try/catch (etc.)??? idk what excatly it must containt. But I want it for my multiplayer game. :)
This is original
byte[] msg = new String("b").getBytes();
DatagramSocket client = new DatagramSocket();
InetAddress inetAddr = InetAddress.getLocalHost();
SocketAddress socketAddr = new InetSocketAddress(inetAddr, 8888);
DatagramPacket sendPacket = new DatagramPacket(msg, msg.length, socketAddr);
client.send(sendPacket);
client.close();//to something like this I think:
try {
}catch (IOException e) {
}
