private void SendData(byte[] data)
{
int count = 0;
int response;
do {
if (count == MaxWriteAttemps)
throw new ProtocolViolationException("[PRES] Can not send correctly");
count++;
this.session.Write(data);
response = this.session.ReadByte();
} while (response != RawPacket.Ack);
}