Example #1
0
func ExampleAmf0Undefined_UnmarshalBinary() {
	b := []byte{0x06} // read from network

	var s protocol.Amf0Undefined
	if err := s.UnmarshalBinary(b); err != nil {
		return
	}

	fmt.Println("amf0 undefined")

	// Output:
	// amf0 undefined
}
Example #2
0
func ExampleAmf0Undefined_MarshalBinary() {
	s := protocol.Amf0Undefined{}

	var b []byte
	var err error
	if b, err = s.MarshalBinary(); err != nil {
		return
	}

	fmt.Println(len(b))
	fmt.Println(b)

	// Output:
	// 1
	// [6]
}