handshake

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package handshake contains the RTMP handshake mechanism.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoClient

func DoClient(rw io.ReadWriter, encrypted bool, strict bool) ([]byte, []byte, error)

DoClient performs a client-side handshake.

func DoServer

func DoServer(rw io.ReadWriter, strict bool) ([]byte, []byte, error)

DoServer performs a server-side handshake.

Types

type C0S0

type C0S0 struct {
	Version byte
}

C0S0 is a C0 or S0 packet.

func (*C0S0) Read

func (c *C0S0) Read(r io.Reader) error

Read reads a C0S0.

func (C0S0) Write

func (c C0S0) Write(w io.Writer) error

Write writes a C0S0.

type C1S1

type C1S1 struct {
	Time    uint32
	Version uint32
	Data    []byte
}

C1S1 is a C1 or S1 packet.

func (*C1S1) Read

func (c *C1S1) Read(r io.Reader) error

Read reads a C1S1.

func (C1S1) Write

func (c C1S1) Write(w io.Writer) error

Write writes a C1S1.

type C2S2

type C2S2 struct {
	Time  uint32
	Time2 uint32
	Data  []byte
}

C2S2 is a C2 or S2 packet.

func (*C2S2) Read

func (c *C2S2) Read(r io.Reader) error

Read reads a C2S2.

func (C2S2) Write

func (c C2S2) Write(w io.Writer) error

Write writes a C2S2.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL