-
-
Save anonymous/7f12343d4e7d87cc9f9991a87951ef9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.DatagramPacket; | |
import java.net.DatagramSocket; | |
import java.net.Inet4Address; | |
import java.net.InetAddress; | |
public class Network { | |
public void sendPacket(final byte[] d) { | |
DatagramSocket socket = new DatagramSocket(null); | |
socket.setReuseAddress(true); | |
socket.setBroadcast(true); | |
DatagramPacket dp = new DatagramPacket(d, d.length, InetAddress.getByName("192.168.1.255"), 56700); | |
socket.send(dp); | |
} | |
} | |
network.sendPacket(Hex.decodeHex( | |
"24000034666a7e0100000000000000000000000000000100000000000000000002000000".toCharArray()) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment