Add collection type, use buffered bytestream.

Fixed some more attribute types.
This commit is contained in:
2021-01-09 17:31:06 +01:00
parent 0805cec129
commit 48aa81238d
5 changed files with 112 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
package ipp
import (
"bufio"
"bytes"
"encoding/binary"
"fmt"
@@ -55,9 +56,10 @@ func (r Request) String() string {
}
func (r *Request) UnMarshal(body io.Reader) {
r.header.unmarshal(body)
buffbody := bufio.NewReader(body)
r.header.unmarshal(buffbody)
//log.Printf("Header %v", r.header)
r.a = UnMarshalAttributues(body)
r.a = UnMarshalAttributes(buffbody)
}
func (r *Request) RequestID() uint32 {