Exemplo n.º 1
0
 public void readFrom(DataInput in) throws Exception {
   type = in.readByte();
   switch (type) {
     case DATA:
       seqno = Bits.readLong(in);
       conn_id = in.readShort();
       first = in.readBoolean();
       break;
     case ACK:
       seqno = Bits.readLong(in);
       conn_id = in.readShort();
       break;
     case SEND_FIRST_SEQNO:
       seqno = Bits.readLong(in);
       break;
   }
 }
Exemplo n.º 2
0
 public void readFrom(DataInput in) throws Exception {
   type = in.readByte();
   seqno = Bits.readLong(in);
   flush_ack = in.readBoolean();
 }