aboutsummaryrefslogtreecommitdiff
path: root/goldap/abandon_request.go
blob: 519641c687ecdccd1c0d871bbdf26155693684d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package message

import "fmt"

//
//        AbandonRequest ::= [APPLICATION 16] MessageID

func readAbandonRequest(bytes *Bytes) (ret AbandonRequest, err error) {
	var mes MessageID
	mes, err = readTaggedMessageID(bytes, classApplication, TagAbandonRequest)
	if err != nil {
		err = LdapError{fmt.Sprintf("readAbandonRequest:\n%s", err.Error())}
		return
	}
	ret = AbandonRequest(mes)
	return
}

func (abandon AbandonRequest) size() int {
	return MessageID(abandon).sizeTagged(TagAbandonRequest)
}

func (abandon AbandonRequest) write(bytes *Bytes) int {
	return MessageID(abandon).writeTagged(bytes, classApplication, TagAbandonRequest)
}