final TCPOutSegment seg = new TCPOutSegment(ipHdr, hdr, dataBuffer, 0, timeoutTicks);
final TCPOutSegment seg = new TCPOutSegment(ipHdr, hdr, dataBuffer, dataOffset, timeoutTicks);
    private final void sendHelper(IPv4Header ipHdr, TCPHeader hdr, int dataOffset)            throws SocketException {        // Adjust the sequence numbers        hdr.setSequenceNr(snd_next);        if (hdr.isFlagSynchronizeSet() || hdr.isFlagFinishedSet()) {            snd_next++;            //snd_unack++;        } else {            snd_next += hdr.getDataLength();        }        snd_max = snd_next;        // Create & send the segment        final TCPOutSegment seg = new TCPOutSegment(ipHdr, hdr, dataBuffer, 0, timeoutTicks);        seg.send(tcp);        if (!seg.isAckOnly() && !hdr.isFlagSynchronizeSet()) {            log.debug("Adding segment " + seg.getSeqNr() + " to unacklist");            unackedSegments.add(seg);        }    }