Implement submit encode

This commit is contained in:
2024-07-24 19:17:34 +02:00
parent 500cb11235
commit 14c861ccb4
4 changed files with 83 additions and 65 deletions

View File

@@ -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)