Commit 5cbaaec0 authored by Gabriele Civitarese's avatar Gabriele Civitarese

pulizia strutture dati

parent bdd6f0a1
...@@ -7,12 +7,15 @@ class UDPServer { ...@@ -7,12 +7,15 @@ class UDPServer {
DatagramSocket serverSocket = new DatagramSocket(9876); DatagramSocket serverSocket = new DatagramSocket(9876);
byte[] receiveData = new byte[1024]; byte[] receiveData;
byte[] sendData = new byte[1024]; byte[] sendData;
while(true) while(true)
{ {
receiveData = new byte[1024];
sendData = new byte[1024];
/* Prepara la struttura dati usata per contenere il pacchetto in ricezione */ /* Prepara la struttura dati usata per contenere il pacchetto in ricezione */
DatagramPacket receivePacket = DatagramPacket receivePacket =
new DatagramPacket(receiveData, receiveData.length); new DatagramPacket(receiveData, receiveData.length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment