func ExampleAmf0Date_UnmarshalBinary() { b := []byte{0x0b, 0, 0, 1, 81, 30, 96, 9, 6, 112, 128} // read from network var s protocol.Amf0Date if err := s.UnmarshalBinary(b); err != nil { return } fmt.Println("amf0 date") // Output: // amf0 date }
func ExampleAmf0Date_MarshalBinary() { s := protocol.Amf0Date{} s.From(time.Now()) var b []byte var err error if b, err = s.MarshalBinary(); err != nil { return } fmt.Println(len(b)) fmt.Println("amf0 date") // Output: // 11 // amf0 date }