final IDataSegment dataSegment = DataSegmentFactory.create(settings.asByteBuffer(), DataSegmentFormat.TEXT, connection.getSettingAsInt(OperationalTextKey.MAX_RECV_DATA_SEGMENT_LENGTH));
int bytes2Process = dataSegment.getLength();
for (IDataSegmentIterator dataSegmentIterator = dataSegment.iterator(); dataSegmentIterator.hasNext();) {
IDataSegmentChunk dataSegmentChunk = dataSegmentIterator.next(bytes2Process);
protocolDataUnit.setDataSegment(dataSegmentChunk);
parser.setTargetTransferTag(0xFFFFFFFF);
}
connection.send(protocolDataUnit);