Add init ack sending, added cookie state

This commit is contained in:
John R. Bradley
2018-07-11 23:28:17 -05:00
committed by Sean DuBois
parent 04f049fb4c
commit 0e43088e58
9 changed files with 125 additions and 11 deletions

View File

@@ -111,6 +111,13 @@ func (i *InitCommon) Marshal() ([]byte, error) {
binary.BigEndian.PutUint16(out[8:], i.numOutboundStreams)
binary.BigEndian.PutUint16(out[10:], i.numInboundStreams)
binary.BigEndian.PutUint32(out[12:], i.initialTSN)
for _, p := range i.params {
pp, err := p.Marshal()
if err != nil {
return nil, errors.Wrap(err, "Unable to marshal parameter for INIT/INITACK")
}
out = append(out, pp...)
}
return out, nil
}