BinaryOutputArchive boa = BinaryOutputArchive.getArchive(baos);
boa.writeInt(-1, "len");
conReq.serialize(boa, "connect");
baos.close();
ByteBuffer bb = ByteBuffer.wrap(baos.toByteArray());
bb.putInt(bb.capacity() - 4);
bb.rewind();
synchronized (outgoingQueue) {
// We add backwards since we are pushing into the front
if (!disableAutoWatchReset) {
SetWatches sw = new SetWatches(lastZxid,