This would not work in all situations, but as my data is relatively small and of known fixed lengths, this is the simple solution which works for my application:
B4X:
Sub Process_Globals
Public Serial1 As Serial
Private usocket As WiFiUDP
Private wifi As ESP8266WiFi
Private astream As AsyncStreams
Private bc As ByteConverter
End Sub
Sub astream_NewData (Buffer() As Byte)
usocket.BeginPacket(ip, port)
For Each s() As Byte In bc.Split(Buffer, CRLF)
If s.Length <> 0 Then
usocket.Write(s)
usocket.SendPacket
End If
Next
End Sub