Add collection type, use buffered bytestream.
Fixed some more attribute types.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package ipp
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -75,9 +76,10 @@ func (r *Response) Marshal() []byte {
|
||||
}
|
||||
|
||||
func (r *Response) 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 *Response) AddPrinterAttribute(a Attribute) {
|
||||
|
||||
Reference in New Issue
Block a user