(w encoding.Writer)
| 20 | } |
| 21 | |
| 22 | func (p *PlayerSession) Encode(w encoding.Writer) error { |
| 23 | if err := w.UUID(p.SessionID); err != nil { |
| 24 | return err |
| 25 | } |
| 26 | if err := w.Long(p.ExpiresAt); err != nil { |
| 27 | return err |
| 28 | } |
| 29 | if err := w.ByteArray(p.PublicKey); err != nil { |
| 30 | return err |
| 31 | } |
| 32 | return w.ByteArray(p.KeySignature) |
| 33 | } |
| 34 | |
| 35 | func (p *PlayerSession) Decode(r encoding.Reader) error { |
| 36 | if err := r.UUID(&p.SessionID); err != nil { |