我收到后可以将DatagramPacket
转换为int
吗?
我收到的就像这样
DatagramSocket aSocket = null;
try
{
aSocket = new DatagramSocket(6789);
byte [] buffer = new byte [1000];
while (true)
{
DatagramPacket request = new DatagramPacket(buffer, buffer.length);
aSocket.receive(request);
}