Vote count:
0
Is there a more concise and/or performant way to traverse the message
than what I have here?
import akka.util.ByteString
def nextValue(message: ByteString): (ByteString, ByteString)
def processFields(message: ByteString): Unit = nextValue(message) match {
case (_, Empty) => // Complete Parsing
case (value, rest) =>
// Do work with value
// loop
processFields(rest, fieldMap.tail)
}
asked 1 min ago
Scala - Traversing a ByteString Until Empty
Aucun commentaire:
Enregistrer un commentaire