UDP协议模拟客户端
public static void main(String[] args) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
dos.writeLong(10000100L);
byte[] buf = baos.toByteArray();
DatagramSocket ds = new DatagramSocket(1234);
DatagramPacket dp = new DatagramPacket(buf,buf.length,new InetSocketAddress("127.0.0.1",9999));
ds.send(dp);
ds.close();
}