Exemplo n.º 1
0
// Write serializes and writes the ExtendedTimestamp instance to the given
// io.Writer according to the RTMP specification.
func (t *ExtendedTimestamp) Write(w io.Writer) error {
	if _, err := spec.PutUint32(t.Delta, w); err != nil {
		return err
	}

	return nil
}
func (c *WindowAckSize) Write(w io.Writer) error {
	if _, err := spec.PutUint32(c.WindowAckSize, w); err != nil {
		return err
	}

	return nil
}
Exemplo n.º 3
0
func (c *AbortMessage) Write(w io.Writer) error {
	if _, err := spec.PutUint32(c.ChunkStreamId, w); err != nil {
		return err
	}

	return nil
}
func (c *Acknowledgement) Write(w io.Writer) error {
	if _, err := spec.PutUint32(c.SequenceNumber, w); err != nil {
		return err
	}

	return nil
}
Exemplo n.º 5
0
func (c *SetChunkSize) Write(w io.Writer) error {
	if _, err := spec.PutUint32(c.ChunkSize(), w); err != nil {
		return err
	}

	return nil
}
func (c *SetPeerBandwidth) Write(w io.Writer) error {
	if _, err := spec.PutUint32(c.AckWindowSize, w); err != nil {
		return err
	}

	if _, err := w.Write([]byte{byte(c.LimitType)}); err != nil {
		return err
	}

	return nil
}