服务器回应客户端socket.send(packet);出错
客户端发送到服务器后,服务器通过socket.getInetAddress()方法获取的实例里面,IP地址是null的,求解答?
Exception in thread "main" java.lang.NullPointerException: null address || null buffer
at java.net.DualStackPlainDatagramSocketImpl.send(DualStackPlainDatagramSocketImpl.java:134)
at java.net.DatagramSocket.send(DatagramSocket.java:693)
at com.UDPServer.main(UDPServer.java:17)