Documentation ¶
Overview ¶
Package handshake provides handshaker interface and default implementations for RTMP handshake stage
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // FMSServerPrivateKey is private server key FMSServerPrivateKey = []byte{ 0x47, 0x65, 0x6e, 0x75, 0x69, 0x6e, 0x65, 0x20, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x20, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x20, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x30, 0x30, 0x31, 0xf0, 0xee, 0xc2, 0x4a, 0x80, 0x68, 0xbe, 0xe8, 0x2e, 0x00, 0xd0, 0xd1, 0x02, 0x9e, 0x7e, 0x57, 0x6e, 0xec, 0x5d, 0x2d, 0x29, 0x80, 0x6f, 0xab, 0x93, 0xb8, 0xe6, 0x36, 0xcf, 0xeb, 0x31, 0xae, } // FMSServerPublicKey is a public server key FMSServerPublicKey = FMSServerPrivateKey[:36] // FPClientPrivateKey is a private client key FPClientPrivateKey = []byte{ 0x47, 0x65, 0x6e, 0x75, 0x69, 0x6e, 0x65, 0x20, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x20, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x20, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x20, 0x30, 0x30, 0x31, 0xf0, 0xee, 0xc2, 0x4a, 0x80, 0x68, 0xbe, 0xe8, 0x2e, 0x00, 0xd0, 0xd1, 0x02, 0x9e, 0x7e, 0x57, 0x6e, 0xec, 0x5d, 0x2d, 0x29, 0x80, 0x6f, 0xab, 0x93, 0xb8, 0xe6, 0x36, 0xcf, 0xeb, 0x31, 0xae, } // FPClientPublicKey is a public client key FPClientPublicKey = FPClientPrivateKey[:30] )
View Source
var ( // ErrInvalidDigestOffset indicates digest not located at expected offset ErrInvalidDigestOffset = errors.New("invalid digest offset") // ErrInvalidDigest indicates invalid digest in handshake ErrInvalidDigest = errors.New("invalid digest") )
Functions ¶
This section is empty.
Types ¶
type Handshaker ¶
type Handshaker interface {
Handshake(rw io.ReadWriter) (timestamp time.Time, peerDelta uint32, err error)
}
Handshaker provides method to perform RTMP handshake with given io.ReadWriter, returning timestamp of connection epoch, peer time beginning point or possible error
func NewClientKeysHandshake ¶
func NewClientKeysHandshake(config *KeysConfig) Handshaker
NewClientKeysHandshake returns client-side keyed handshake
func NewEchoHandshake ¶
func NewEchoHandshake() Handshaker
NewEchoHandshake returns new simple echo handshaker instance
func NewServerKeysHandshake ¶
func NewServerKeysHandshake(config *KeysConfig) Handshaker
NewServerKeysHandshake returns server-side keyed handshake
Click to show internal directories.
Click to hide internal directories.