DatagramSocket(int port)
Constructs a datagram socket and binds it to the specified port on the local host machine.
Constructs a datagram socket and binds it to the specified port on the local host machine.
UDP到底能不能用同一个端口,既接收又发送。
因为在我的程序里要,服务器端只把响应发回到客户端的发送端口。
DatagramPacket([],int,"host",port)我测试了一下可以同时使用不出问题