Пример #1
0
 @Override
 public void writeTo(DataOutput out) throws Exception {
   out.writeByte(type);
   messageID.writeTo(out);
   Bits.writeLong(sequencerNumber, out);
   Util.writeAddresses(destinations, out);
 }
Пример #2
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;
   }
 }
Пример #3
0
 public void writeTo(DataOutput out) throws Exception {
   out.writeByte(type);
   Bits.writeLong(seqno, out);
   out.writeBoolean(flush_ack);
 }