ok.
Scusa, ma questa operazione la posso far eseguire mentre manda altri pacchetti?
Mi spiego meglio, ho questa funzione che manda di continuo:
codice:
bw.write(VERSION);
    while(!inattivo){
    if(available==false){  // gestione concorrente con la scrittura dei pacchetti
    //bw.write(hexString(packet)+"\n");
    if (packet.length > 255)
	    throw new IOException("pacchetto troppo lungo\n");
    if (packet.length == 0)
	    throw new IOException("pacchetto troppo corto\n");
    bw.write((byte)packet.length);
    bw.write(packet);
    bw.flush();

    //System.out.print(pak);
    available=true;  
      }
    }
Adesso posso aggiungere la possibilità di leggere pacchetti dentro lo stesso while?
oppure si blocca nel caso i pacchetti non fossero inviati?