Brouillon+mbuffer

against gZFS/zfs-replica v65
185:(fullreplication) $BINZFS send $snapshot2replicate |ssh -o BatchMode=yes root@$server $BINZFS recv $namereplica
228:(incremental_replication) $BINZFS send -i $lastsnapshotReplicated $namevolfs@$snasphot2replicate | ssh -o BatchMode=yes root@$server $BINZFS recv $namereplica

LOCALHOST=$(hostname -s)

function computePort {
# add a number, based on replica name, to mbuffer base port.
# This try to avoid problems, on multiple replicas cases, such as reception of 
# different replicas on same mbuffer port: yeah, epic fail!
  BasePORT="1030" 
  #for i in $(echo $snapshot2replicate| od -An -t u1); do j=$(($j+$i)); echo $j; done
  SumChar=0
  BaseChars=$(echo $snapshot2replicate | od -An -t u1)
  for i in $BaseChars
  do
    SumChar=$(($SumChar+$i))
  done
  PORT=$(($BasePORT+$SumChar))
}
#echo "$LOCALHOST:$PORT" 

computePort
ssh -o BatchMode=yes root@$server "mbuffer -4 -v 1 -s 128k -m 1G -I $LOCALHOST:$PORT | $BINZFS recv $namereplica " &
sleep 5s
$BINZFS send $snapshot2replicate | mbuffer -4 -v 1 -s 128k -m 1G -O $server:$PORT

computePort
ssh -o BatchMode=yes root@$server "mbuffer -4 -v 1 -s 128k -m 1G -I $LOCALHOST:$PORT | $BINZFS recv $namereplica " &
sleep 5s
$BINZFS send -i $lastsnapshotReplicated $namevolfs@$snasphot2replicate | mbuffer -4 -v 1 -s 128k -m 1G -O $server:$PORT