Implement submit encode
This commit is contained in:
@@ -58,6 +58,9 @@ type (
|
||||
// Don't know
|
||||
|
||||
func (p *PDU_HEADER) Encode(buf *bytes.Buffer) error {
|
||||
if buf == nil {
|
||||
return fmt.Errorf("cannot encode into nil buffer")
|
||||
}
|
||||
binary.Write(buf, binary.BigEndian, p.command_length)
|
||||
binary.Write(buf, binary.BigEndian, p.command_id)
|
||||
binary.Write(buf, binary.BigEndian, p.command_status)
|
||||
|
||||
Reference in New Issue
Block a user