예제 #1
0
 public void writeTo(DataOutput out) throws Exception {
   out.writeByte(type);
   switch (type) {
     case DATA:
       Bits.writeLong(seqno, out);
       out.writeShort(conn_id);
       out.writeBoolean(first);
       break;
     case ACK:
       Bits.writeLong(seqno, out);
       out.writeShort(conn_id);
       break;
     case SEND_FIRST_SEQNO:
       Bits.writeLong(seqno, out);
       break;
   }
 }
예제 #2
0
 public void writeTo(DataOutput out) throws Exception {
   out.writeByte(type);
   Bits.writeLong(seqno, out);
   out.writeBoolean(flush_ack);
 }