Documentation ¶
Index ¶
- func BigEndianToUint32(b []byte) uint32
- func GenerateCommonConnInitializer() func(c Conn)
- func IsConnFatalError(err error) bool
- func IsConnRejectedError(err error) bool
- func IsConnWarnError(err error) bool
- func ListenAndServe(ctx context.Context, addr string, logger *zap.Logger, connOps ...ConnOption) error
- func LittleEndianToUint32(b []byte) uint32
- func ReadExtendedTimestamp(r io.Reader) (uint32, error)
- func Uint32ToBigEndian(b []byte, v uint32)
- func Uint32ToLittleEndian(b []byte, v uint32)
- type AbortMessage
- type AbortMessageHandler
- type AbortMessageHandlerFunc
- type Acknowledgement
- type AcknowledgementHandler
- type AcknowledgementHandlerFunc
- type AudioCodecFlag
- type BandwidthLimitType
- type Call
- type CallHandler
- type CallHandlerFunc
- type CallResponse
- type CallResponseHandler
- type CallResponseHandlerFunc
- type Chunk
- type ChunkBasicHeader
- type ChunkBasicHeader1B
- type ChunkBasicHeader2B
- type ChunkBasicHeader3B
- type ChunkHeader
- type ChunkMessageHeader
- type ChunkMessageHeaderType0
- type ChunkMessageHeaderType1
- type ChunkMessageHeaderType2
- type ChunkMessageHeaderType3
- type Client
- type Close
- type CloseHandler
- type CloseHandlerFunc
- type CloseStream
- type CloseStreamHandler
- type CloseStreamHandlerFunc
- type Conn
- type ConnError
- type ConnOption
- type Connect
- type ConnectError
- type ConnectErrorHandler
- type ConnectErrorHandlerFunc
- type ConnectHandler
- type ConnectHandlerFunc
- type ConnectResponse
- type ConnectResult
- type ConnectResultHandler
- type ConnectResultHandlerFunc
- type ControlMessageHandler
- type CreateStream
- type CreateStreamError
- type CreateStreamErrorHandler
- type CreateStreamErrorHandlerFunc
- type CreateStreamHandler
- type CreateStreamHandlerFunc
- type CreateStreamResponse
- type CreateStreamResult
- type CreateStreamResultHandler
- type CreateStreamResultHandlerFunc
- type DeleteStream
- type DeleteStreamHandler
- type DeleteStreamHandlerFunc
- type EncodingAMFType
- type ErrorLevel
- type EventType
- type Message
- type MessageHandler
- type MessageHandlerFunc
- type MessagePubsub
- type MessageTypeID
- type NetConnectionCommandHandler
- func (h *NetConnectionCommandHandler) OnCall(ctx context.Context, call Call) ConnError
- func (h *NetConnectionCommandHandler) OnCallResponse(ctx context.Context, callResponse CallResponse) ConnError
- func (h *NetConnectionCommandHandler) OnClose(ctx context.Context, close Close) ConnError
- func (h *NetConnectionCommandHandler) OnConnect(ctx context.Context, connect Connect) ConnError
- func (h *NetConnectionCommandHandler) OnConnectError(ctx context.Context, connectError ConnectError) ConnError
- func (h *NetConnectionCommandHandler) OnConnectResult(ctx context.Context, connectResult ConnectResult) ConnError
- func (h *NetConnectionCommandHandler) OnCreateStream(ctx context.Context, createStream CreateStream) ConnError
- func (h *NetConnectionCommandHandler) OnCreateStreamError(ctx context.Context, createStreamError CreateStreamError) ConnError
- func (h *NetConnectionCommandHandler) OnCreateStreamResult(ctx context.Context, createStreamResult CreateStreamResult) ConnError
- type NetConnectionCommander
- type NetStreamCommandHandler
- func (h *NetStreamCommandHandler) OnCloseStream(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, ...) ConnError
- func (h *NetStreamCommandHandler) OnDeleteStream(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, ...) ConnError
- func (h *NetStreamCommandHandler) OnOnStatus(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, ...) ConnError
- func (h *NetStreamCommandHandler) OnPause(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, pause Pause) ConnError
- func (h *NetStreamCommandHandler) OnPlay(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, play Play) ConnError
- func (h *NetStreamCommandHandler) OnPlay2(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, play2 Play2) ConnError
- func (h *NetStreamCommandHandler) OnPublish(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, ...) ConnError
- func (h *NetStreamCommandHandler) OnReceiveAudio(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, ...) ConnError
- func (h *NetStreamCommandHandler) OnReceiveVideo(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, ...) ConnError
- func (h *NetStreamCommandHandler) OnSeek(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, seek Seek) ConnError
- type NetStreamCommander
- type OnStatus
- type OnStatusHandler
- type OnStatusHandlerFunc
- type Pause
- type PauseHandler
- type PauseHandlerFunc
- type PingRequest
- type PingRequestHandler
- type PingRequestHandlerFunc
- type PingResponse
- type PingResponseHandler
- type PingResponseHandlerFunc
- type Play
- type Play2
- type Play2Handler
- type Play2HandlerFunc
- type PlayHandler
- type PlayHandlerFunc
- type ProtocolControlEventHandler
- func (h *ProtocolControlEventHandler) OnAbortMessage(ctx context.Context, abortMessage AbortMessage) ConnError
- func (h *ProtocolControlEventHandler) OnAcknowledgement(ctx context.Context, acknowledgement Acknowledgement) ConnError
- func (h *ProtocolControlEventHandler) OnSetChunkSize(ctx context.Context, setChunkSize SetChunkSize) ConnError
- func (h *ProtocolControlEventHandler) OnSetPeerBandwidth(ctx context.Context, setPeerBandwidth SetPeerBandwidth) ConnError
- func (h *ProtocolControlEventHandler) OnWindowAcknowledgementSize(ctx context.Context, windowAcknowledgementSize WindowAcknowledgementSize) ConnError
- type ProtocolController
- type Publish
- type PublishHandler
- type PublishHandlerFunc
- type PublishingType
- type Reader
- type ReceiveAudio
- type ReceiveAudioHandler
- type ReceiveAudioHandlerFunc
- type ReceiveVideo
- type ReceiveVideoHandler
- type ReceiveVideoHandlerFunc
- type Seek
- type SeekHandler
- type SeekHandlerFunc
- type Server
- type SetBufferLength
- type SetBufferLengthHandler
- type SetBufferLengthHandlerFunc
- type SetChunkSize
- type SetChunkSizeHandler
- type SetChunkSizeHandlerFunc
- type SetPeerBandwidth
- type SetPeerBandwidthHandler
- type SetPeerBandwidthHandlerFunc
- type StreamBegin
- type StreamBeginHandler
- type StreamBeginHandlerFunc
- type StreamDry
- type StreamDryHandler
- type StreamDryHandlerFunc
- type StreamEOF
- type StreamEOFHandler
- type StreamEOFHandlerFunc
- type StreamIsRecorded
- type StreamIsRecordedHandler
- type StreamIsRecordedHandlerFunc
- type UserControlEventHandler
- func (h *UserControlEventHandler) OnPingRequest(ctx context.Context, pingRequest PingRequest) ConnError
- func (h *UserControlEventHandler) OnPingResponse(ctx context.Context, pingResponse PingResponse) ConnError
- func (h *UserControlEventHandler) OnSetBufferLength(ctx context.Context, setBufferLength SetBufferLength) ConnError
- func (h *UserControlEventHandler) OnStreamBegin(ctx context.Context, streamBegin StreamBegin) ConnError
- func (h *UserControlEventHandler) OnStreamDry(ctx context.Context, streamDry StreamDry) ConnError
- func (h *UserControlEventHandler) OnStreamEOF(ctx context.Context, streamEOF StreamEOF) ConnError
- func (h *UserControlEventHandler) OnStreamIsRecorded(ctx context.Context, streamIsRecorded StreamIsRecorded) ConnError
- type UserControlMessage
- type UserController
- type VideoCodecFlag
- type VideoFunctionFlag
- type WindowAcknowledgementSize
- type WindowAcknowledgementSizeHandler
- type WindowAcknowledgementSizeHandlerFunc
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BigEndianToUint32 ¶
func GenerateCommonConnInitializer ¶
func GenerateCommonConnInitializer() func(c Conn)
func IsConnFatalError ¶
func IsConnRejectedError ¶
func IsConnWarnError ¶
func ListenAndServe ¶
func LittleEndianToUint32 ¶
func Uint32ToBigEndian ¶
func Uint32ToLittleEndian ¶
Types ¶
type AbortMessage ¶
type AbortMessage interface { encoding.BinaryMarshaler encoding.BinaryUnmarshaler zapcore.ObjectMarshaler ChunkStreamID() uint32 }
func NewAbortMessage ¶
func NewAbortMessage( chunkStreamID uint32, ) AbortMessage
func ReadAbortMessage ¶
func ReadAbortMessage(r io.Reader) (AbortMessage, error)
func UnmarshalAbortMessageBinary ¶
func UnmarshalAbortMessageBinary(b []byte) (AbortMessage, error)
type AbortMessageHandler ¶
type AbortMessageHandler interface {
OnAbortMessage(ctx context.Context, abortMessage AbortMessage) ConnError
}
type AbortMessageHandlerFunc ¶
type AbortMessageHandlerFunc func(ctx context.Context, abortMessage AbortMessage) ConnError
func (AbortMessageHandlerFunc) OnAbortMessage ¶
func (f AbortMessageHandlerFunc) OnAbortMessage(ctx context.Context, abortMessage AbortMessage) ConnError
type Acknowledgement ¶
type Acknowledgement interface { encoding.BinaryMarshaler encoding.BinaryUnmarshaler zapcore.ObjectMarshaler SequenceNumber() uint32 }
func NewAcknowledgement ¶
func NewAcknowledgement( sequenceNumber uint32, ) Acknowledgement
func ReadAcknowledgement ¶
func ReadAcknowledgement(r io.Reader) (Acknowledgement, error)
func UnmarshalAcknowledgementBinary ¶
func UnmarshalAcknowledgementBinary(b []byte) (Acknowledgement, error)
type AcknowledgementHandler ¶
type AcknowledgementHandler interface {
OnAcknowledgement(ctx context.Context, acknowledgement Acknowledgement) ConnError
}
type AcknowledgementHandlerFunc ¶
type AcknowledgementHandlerFunc func(ctx context.Context, acknowledgement Acknowledgement) ConnError
func (AcknowledgementHandlerFunc) OnAcknowledgement ¶
func (f AcknowledgementHandlerFunc) OnAcknowledgement(ctx context.Context, acknowledgement Acknowledgement) ConnError
type AudioCodecFlag ¶
type AudioCodecFlag uint32
const ( AudioCodecFlagNone AudioCodecFlag = 1 AudioCodecFlagAdpcm AudioCodecFlag = 2 AudioCodecFlagMp3 AudioCodecFlag = 4 AudioCodecFlagIntel AudioCodecFlag = 8 AudioCodecFlagUnused AudioCodecFlag = 16 AudioCodecFlagNelly8 AudioCodecFlag = 32 AudioCodecFlagNelly AudioCodecFlag = 64 AudioCodecFlagG711a AudioCodecFlag = 128 AudioCodecFlagG711u AudioCodecFlag = 256 AudioCodecFlagNelly16 AudioCodecFlag = 512 AudioCodecFlagAac AudioCodecFlag = 1024 AudioCodecFlagSpeex AudioCodecFlag = 2048 AudioCodecFlagAll AudioCodecFlag = 4095 )
func (AudioCodecFlag) String ¶
func (i AudioCodecFlag) String() string
type BandwidthLimitType ¶
type BandwidthLimitType uint8
const ( BandwidthLimitTypeHard BandwidthLimitType = 0 BandwidthLimitTypeSoft BandwidthLimitType = 1 BandwidthLimitTypeDynamic BandwidthLimitType = 2 )
func (BandwidthLimitType) String ¶
func (i BandwidthLimitType) String() string
type Call ¶
type Call interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler ProcedureName() string TransactionID() uint32 CommandObject() map[string]interface{} OptionalArguments() map[string]interface{} EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func UnmarshalCallBinary ¶
func UnmarshalCallBinary(b []byte, encodingAMFType EncodingAMFType) (Call, error)
type CallHandlerFunc ¶
type CallResponse ¶
type CallResponse interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} Response() map[string]interface{} EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func NewCallResponse ¶
func NewCallResponse( commandName string, transactionID uint32, commandObject map[string]interface{}, response map[string]interface{}, encodingAMFType EncodingAMFType, ) CallResponse
func UnmarshalCallResponseBinary ¶
func UnmarshalCallResponseBinary(b []byte, encodingAMFType EncodingAMFType) (CallResponse, error)
type CallResponseHandler ¶
type CallResponseHandler interface {
OnCallResponse(ctx context.Context, callResponse CallResponse) ConnError
}
type CallResponseHandlerFunc ¶
type CallResponseHandlerFunc func(ctx context.Context, callResponse CallResponse) ConnError
func (CallResponseHandlerFunc) OnCallResponse ¶
func (f CallResponseHandlerFunc) OnCallResponse(ctx context.Context, callResponse CallResponse) ConnError
type Chunk ¶
type Chunk interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler Header() ChunkHeader Data() []byte }
func NewChunk ¶
func NewChunk( header ChunkHeader, data []byte, ) Chunk
type ChunkBasicHeader ¶
type ChunkBasicHeader interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler Fmt() uint8 ChunkStreamID() uint32 }
func GenerateChunkBasicHeader ¶
func GenerateChunkBasicHeader(fmt uint8, chunkStreamID uint32) ChunkBasicHeader
func ReadChunkBasicHeader ¶
func ReadChunkBasicHeader(r io.Reader) (ChunkBasicHeader, error)
type ChunkBasicHeader1B ¶
type ChunkBasicHeader1B interface { ChunkBasicHeader encoding.BinaryUnmarshaler }
func NewChunkBasicHeader1B ¶
func NewChunkBasicHeader1B( fmt uint8, chunkStreamID uint32, ) ChunkBasicHeader1B
func ReadChunkBasicHeader1B ¶
func ReadChunkBasicHeader1B(r io.Reader) (ChunkBasicHeader1B, error)
func UnmarshalChunkBasicHeader1BBinary ¶
func UnmarshalChunkBasicHeader1BBinary(b []byte) (ChunkBasicHeader1B, error)
type ChunkBasicHeader2B ¶
type ChunkBasicHeader2B interface { ChunkBasicHeader encoding.BinaryUnmarshaler }
func NewChunkBasicHeader2B ¶
func NewChunkBasicHeader2B( fmt uint8, chunkStreamID uint32, ) ChunkBasicHeader2B
func ReadChunkBasicHeader2B ¶
func ReadChunkBasicHeader2B(r io.Reader) (ChunkBasicHeader2B, error)
func UnmarshalChunkBasicHeader2BBinary ¶
func UnmarshalChunkBasicHeader2BBinary(b []byte) (ChunkBasicHeader2B, error)
type ChunkBasicHeader3B ¶
type ChunkBasicHeader3B interface { ChunkBasicHeader encoding.BinaryUnmarshaler }
func NewChunkBasicHeader3B ¶
func NewChunkBasicHeader3B( fmt uint8, chunkStreamID uint32, ) ChunkBasicHeader3B
func ReadChunkBasicHeader3B ¶
func ReadChunkBasicHeader3B(r io.Reader) (ChunkBasicHeader3B, error)
func UnmarshalChunkBasicHeader3BBinary ¶
func UnmarshalChunkBasicHeader3BBinary(b []byte) (ChunkBasicHeader3B, error)
type ChunkHeader ¶
type ChunkHeader interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler BasicHeader() ChunkBasicHeader MessageHeader() ChunkMessageHeader ExtendedTimestamp() uint32 Timestamp() uint32 TimestampDelta() uint32 }
func NewChunkHeader ¶
func NewChunkHeader( basicHeader ChunkBasicHeader, messageHeader ChunkMessageHeader, extendedTimestamp uint32, ) ChunkHeader
func ReadChunkHeader ¶
func ReadChunkHeader(r io.Reader) (ChunkHeader, error)
type ChunkMessageHeader ¶
type ChunkMessageHeader interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler NeedsExtendedTimestamp() bool }
func ReadChunkMessageHeader ¶
func ReadChunkMessageHeader(r io.Reader, fmt uint8) (ChunkMessageHeader, error)
type ChunkMessageHeaderType0 ¶
type ChunkMessageHeaderType0 interface { ChunkMessageHeader encoding.BinaryUnmarshaler Timestamp() uint32 MessageLength() uint32 MessageTypeID() MessageTypeID MessageStreamID() uint32 }
func NewChunkMessageHeaderType0 ¶
func NewChunkMessageHeaderType0( timestamp uint32, messageLength uint32, messageTypeID MessageTypeID, messageStreamID uint32, ) ChunkMessageHeaderType0
func ReadChunkMessageHeaderType0 ¶
func ReadChunkMessageHeaderType0(r io.Reader) (ChunkMessageHeaderType0, error)
func UnmarshalChunkMessageHeaderType0Binary ¶
func UnmarshalChunkMessageHeaderType0Binary(b []byte) (ChunkMessageHeaderType0, error)
type ChunkMessageHeaderType1 ¶
type ChunkMessageHeaderType1 interface { ChunkMessageHeader encoding.BinaryUnmarshaler TimestampDelta() uint32 MessageLength() uint32 MessageTypeID() MessageTypeID }
func NewChunkMessageHeaderType1 ¶
func NewChunkMessageHeaderType1( timestampDelta uint32, messageLength uint32, messageTypeID MessageTypeID, ) ChunkMessageHeaderType1
func ReadChunkMessageHeaderType1 ¶
func ReadChunkMessageHeaderType1(r io.Reader) (ChunkMessageHeaderType1, error)
func UnmarshalChunkMessageHeaderType1Binary ¶
func UnmarshalChunkMessageHeaderType1Binary(b []byte) (ChunkMessageHeaderType1, error)
type ChunkMessageHeaderType2 ¶
type ChunkMessageHeaderType2 interface { ChunkMessageHeader encoding.BinaryUnmarshaler TimestampDelta() uint32 }
func NewChunkMessageHeaderType2 ¶
func NewChunkMessageHeaderType2( timestampDelta uint32, ) ChunkMessageHeaderType2
func ReadChunkMessageHeaderType2 ¶
func ReadChunkMessageHeaderType2(r io.Reader) (ChunkMessageHeaderType2, error)
func UnmarshalChunkMessageHeaderType2Binary ¶
func UnmarshalChunkMessageHeaderType2Binary(b []byte) (ChunkMessageHeaderType2, error)
type ChunkMessageHeaderType3 ¶
type ChunkMessageHeaderType3 interface { ChunkMessageHeader encoding.BinaryUnmarshaler }
func NewChunkMessageHeaderType3 ¶
func NewChunkMessageHeaderType3() ChunkMessageHeaderType3
func ReadChunkMessageHeaderType3 ¶
func ReadChunkMessageHeaderType3(r io.Reader) (ChunkMessageHeaderType3, error)
func UnmarshalChunkMessageHeaderType3Binary ¶
func UnmarshalChunkMessageHeaderType3Binary(b []byte) (ChunkMessageHeaderType3, error)
type Close ¶
type Close interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func NewClose ¶
func NewClose( encodingAMFType EncodingAMFType, ) Close
func UnmarshalCloseBinary ¶
func UnmarshalCloseBinary(b []byte, encodingAMFType EncodingAMFType) (Close, error)
type CloseHandler ¶
type CloseHandlerFunc ¶
type CloseStream ¶
type CloseStream interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} StreamID() uint32 EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func NewCloseStream ¶
func NewCloseStream( streamID uint32, encodingAMFType EncodingAMFType, ) CloseStream
func UnmarshalCloseStreamBinary ¶
func UnmarshalCloseStreamBinary(b []byte, encodingAMFType EncodingAMFType) (CloseStream, error)
type CloseStreamHandler ¶
type CloseStreamHandlerFunc ¶
type CloseStreamHandlerFunc func(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, closeStream CloseStream) ConnError
func (CloseStreamHandlerFunc) OnCloseStream ¶
func (f CloseStreamHandlerFunc) OnCloseStream(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, closeStream CloseStream) ConnError
type Conn ¶
type Conn interface { Serve() error io.Closer Context() context.Context Reader() Reader SetReader(r Reader) Writer() Writer SetWriter(w Writer) MessagePubsub ProtocolController DefaultProtocolControlEventHandler() ProtocolControlEventHandler UserController DefaultUserControlEventHandler() UserControlEventHandler NetConnectionCommander DefaultNetConnectionCommandHandler() NetConnectionCommandHandler NetStreamCommander DefaultNetStreamCommandHandler() NetStreamCommandHandler SetCreateStreamCallbacks(transactionID uint32, f func(CreateStreamResponse) ConnError) AddNetstreamCommandCallbacks(func(OnStatus) ConnError) TransactionID() uint32 Logger() *zap.Logger }
type ConnError ¶
type ConnError interface { error ErrorLevel() ErrorLevel Fields() []zapcore.Field }
type ConnOption ¶
type ConnOption func(*connOptions)
func WithConnInitializers ¶
func WithConnInitializers(connInitializers ...func(Conn)) ConnOption
func WithOnConnectValidators ¶
func WithOnConnectValidators(onConnectValidators ...func(ctx context.Context, connect Connect) ConnectError) ConnOption
func WithOnPublishValidators ¶
func WithOnPublishValidators(onPublishValidators ...func(ctx context.Context, publish Publish) (errorInfo map[string]interface{})) ConnOption
type Connect ¶
type Connect interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} OptionalUserArguments() map[string]interface{} EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func NewConnect ¶
func NewConnect( commandObject map[string]interface{}, optionalUserArguments map[string]interface{}, encodingAMFType EncodingAMFType, ) Connect
func UnmarshalConnectBinary ¶
func UnmarshalConnectBinary(b []byte, encodingAMFType EncodingAMFType) (Connect, error)
type ConnectError ¶
type ConnectError interface { ConnectResponse CommandName() string TransactionID() uint32 Properties() map[string]interface{} Information() map[string]interface{} }
func NewConnectError ¶
func NewConnectError( properties map[string]interface{}, information map[string]interface{}, encodingAMFType EncodingAMFType, ) ConnectError
func UnmarshalConnectErrorBinary ¶
func UnmarshalConnectErrorBinary(b []byte, encodingAMFType EncodingAMFType) (ConnectError, error)
type ConnectErrorHandler ¶
type ConnectErrorHandler interface {
OnConnectError(ctx context.Context, connectError ConnectError) ConnError
}
type ConnectErrorHandlerFunc ¶
type ConnectErrorHandlerFunc func(ctx context.Context, connectError ConnectError) ConnError
func (ConnectErrorHandlerFunc) OnConnectError ¶
func (f ConnectErrorHandlerFunc) OnConnectError(ctx context.Context, connectError ConnectError) ConnError
type ConnectHandler ¶
type ConnectHandlerFunc ¶
type ConnectResponse ¶
type ConnectResponse interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
type ConnectResult ¶
type ConnectResult interface { ConnectResponse CommandName() string TransactionID() uint32 Properties() map[string]interface{} Information() map[string]interface{} }
func NewConnectResult ¶
func NewConnectResult( properties map[string]interface{}, information map[string]interface{}, encodingAMFType EncodingAMFType, ) ConnectResult
func UnmarshalConnectResultBinary ¶
func UnmarshalConnectResultBinary(b []byte, encodingAMFType EncodingAMFType) (ConnectResult, error)
type ConnectResultHandler ¶
type ConnectResultHandler interface {
OnConnectResult(ctx context.Context, connectResult ConnectResult) ConnError
}
type ConnectResultHandlerFunc ¶
type ConnectResultHandlerFunc func(ctx context.Context, connectResult ConnectResult) ConnError
func (ConnectResultHandlerFunc) OnConnectResult ¶
func (f ConnectResultHandlerFunc) OnConnectResult(ctx context.Context, connectResult ConnectResult) ConnError
type ControlMessageHandler ¶
type ControlMessageHandler struct { ProtocolControlEventHandler ProtocolControlEventHandler UserControlEventHandler UserControlEventHandler NetConnectionCommandHandler NetConnectionCommandHandler NetStreamCommandHandler NetStreamCommandHandler }
func NewControlMessageHandler ¶
func NewControlMessageHandler(conn Conn) *ControlMessageHandler
func (*ControlMessageHandler) HandleMessage ¶
func (h *ControlMessageHandler) HandleMessage(ctx context.Context, m Message) ConnError
type CreateStream ¶
type CreateStream interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func NewCreateStream ¶
func NewCreateStream( transactionID uint32, commandObject map[string]interface{}, encodingAMFType EncodingAMFType, ) CreateStream
func UnmarshalCreateStreamBinary ¶
func UnmarshalCreateStreamBinary(b []byte, encodingAMFType EncodingAMFType) (CreateStream, error)
type CreateStreamError ¶
type CreateStreamError interface { CreateStreamResponse CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} StreamID() uint32 }
func NewCreateStreamError ¶
func NewCreateStreamError( transactionID uint32, commandObject map[string]interface{}, streamID uint32, encodingAMFType EncodingAMFType, ) CreateStreamError
func UnmarshalCreateStreamErrorBinary ¶
func UnmarshalCreateStreamErrorBinary(b []byte, encodingAMFType EncodingAMFType) (CreateStreamError, error)
type CreateStreamErrorHandler ¶
type CreateStreamErrorHandler interface {
OnCreateStreamError(ctx context.Context, createStreamError CreateStreamError) ConnError
}
type CreateStreamErrorHandlerFunc ¶
type CreateStreamErrorHandlerFunc func(ctx context.Context, createStreamError CreateStreamError) ConnError
func (CreateStreamErrorHandlerFunc) OnCreateStreamError ¶
func (f CreateStreamErrorHandlerFunc) OnCreateStreamError(ctx context.Context, createStreamError CreateStreamError) ConnError
type CreateStreamHandler ¶
type CreateStreamHandler interface {
OnCreateStream(ctx context.Context, createStream CreateStream) ConnError
}
type CreateStreamHandlerFunc ¶
type CreateStreamHandlerFunc func(ctx context.Context, createStream CreateStream) ConnError
func (CreateStreamHandlerFunc) OnCreateStream ¶
func (f CreateStreamHandlerFunc) OnCreateStream(ctx context.Context, createStream CreateStream) ConnError
type CreateStreamResponse ¶
type CreateStreamResponse interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
type CreateStreamResult ¶
type CreateStreamResult interface { CreateStreamResponse CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} StreamID() uint32 }
func NewCreateStreamResult ¶
func NewCreateStreamResult( transactionID uint32, commandObject map[string]interface{}, streamID uint32, encodingAMFType EncodingAMFType, ) CreateStreamResult
func UnmarshalCreateStreamResultBinary ¶
func UnmarshalCreateStreamResultBinary(b []byte, encodingAMFType EncodingAMFType) (CreateStreamResult, error)
type CreateStreamResultHandler ¶
type CreateStreamResultHandler interface {
OnCreateStreamResult(ctx context.Context, createStreamResult CreateStreamResult) ConnError
}
type CreateStreamResultHandlerFunc ¶
type CreateStreamResultHandlerFunc func(ctx context.Context, createStreamResult CreateStreamResult) ConnError
func (CreateStreamResultHandlerFunc) OnCreateStreamResult ¶
func (f CreateStreamResultHandlerFunc) OnCreateStreamResult(ctx context.Context, createStreamResult CreateStreamResult) ConnError
type DeleteStream ¶
type DeleteStream interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} StreamID() uint32 EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func NewDeleteStream ¶
func NewDeleteStream( streamID uint32, encodingAMFType EncodingAMFType, ) DeleteStream
func UnmarshalDeleteStreamBinary ¶
func UnmarshalDeleteStreamBinary(b []byte, encodingAMFType EncodingAMFType) (DeleteStream, error)
type DeleteStreamHandler ¶
type DeleteStreamHandlerFunc ¶
type DeleteStreamHandlerFunc func(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, deleteStream DeleteStream) ConnError
func (DeleteStreamHandlerFunc) OnDeleteStream ¶
func (f DeleteStreamHandlerFunc) OnDeleteStream(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, deleteStream DeleteStream) ConnError
type EncodingAMFType ¶
type EncodingAMFType uint8
const ( EncodingAMFTypeAMF0 EncodingAMFType = 0 EncodingAMFTypeAMF3 EncodingAMFType = 3 )
func (EncodingAMFType) String ¶
func (i EncodingAMFType) String() string
type ErrorLevel ¶
type ErrorLevel string
const ( ErrorLevelFatal ErrorLevel = "fatal" ErrorLevelWarn ErrorLevel = "warn" ErrorLevelRejected ErrorLevel = "rejected" )
type Message ¶
type Message interface { zapcore.ObjectMarshaler ChunkStreamID() uint32 TypeID() MessageTypeID Timestamp() uint32 StreamID() uint32 Payload() []byte }
func NewMessage ¶
type MessageHandler ¶
type MessageHandlerFunc ¶
func (MessageHandlerFunc) HandleMessage ¶
func (f MessageHandlerFunc) HandleMessage(ctx context.Context, m Message) ConnError
type MessagePubsub ¶
type MessagePubsub interface { MessageHandler AddMessageHandler(id string, h MessageHandler) RemoveMessageHandler(id string) }
func NewDefaultMessagePubsub ¶
func NewDefaultMessagePubsub() MessagePubsub
type MessageTypeID ¶
type MessageTypeID uint8
const ( MessageTypeIDSetChunkSize MessageTypeID = 1 MessageTypeIDAbortMessage MessageTypeID = 2 MessageTypeIDAcknowledgement MessageTypeID = 3 MessageTypeIDUserControlMessages MessageTypeID = 4 MessageTypeIDWindowAcknowledgementSize MessageTypeID = 5 MessageTypeIDSetPeerBandwidth MessageTypeID = 6 MessageTypeIDAudio MessageTypeID = 8 MessageTypeIDVideo MessageTypeID = 9 MessageTypeIDDataAMF3 MessageTypeID = 15 MessageTypeIDCommandAMF3 MessageTypeID = 17 MessageTypeIDDataAMF0 MessageTypeID = 18 MessageTypeIDCommandAMF0 MessageTypeID = 20 MessageTypeIDAggregate MessageTypeID = 22 )
func (MessageTypeID) String ¶
func (i MessageTypeID) String() string
type NetConnectionCommandHandler ¶
type NetConnectionCommandHandler struct { ConnectHandlers []ConnectHandler ConnectResultHandlers []ConnectResultHandler ConnectErrorHandlers []ConnectErrorHandler CallHandlers []CallHandler CallResponseHandlers []CallResponseHandler CloseHandlers []CloseHandler CreateStreamHandlers []CreateStreamHandler CreateStreamResultHandlers []CreateStreamResultHandler CreateStreamErrorHandlers []CreateStreamErrorHandler }
func (*NetConnectionCommandHandler) OnCall ¶
func (h *NetConnectionCommandHandler) OnCall(ctx context.Context, call Call) ConnError
func (*NetConnectionCommandHandler) OnCallResponse ¶
func (h *NetConnectionCommandHandler) OnCallResponse(ctx context.Context, callResponse CallResponse) ConnError
func (*NetConnectionCommandHandler) OnClose ¶
func (h *NetConnectionCommandHandler) OnClose(ctx context.Context, close Close) ConnError
func (*NetConnectionCommandHandler) OnConnect ¶
func (h *NetConnectionCommandHandler) OnConnect(ctx context.Context, connect Connect) ConnError
func (*NetConnectionCommandHandler) OnConnectError ¶
func (h *NetConnectionCommandHandler) OnConnectError(ctx context.Context, connectError ConnectError) ConnError
func (*NetConnectionCommandHandler) OnConnectResult ¶
func (h *NetConnectionCommandHandler) OnConnectResult(ctx context.Context, connectResult ConnectResult) ConnError
func (*NetConnectionCommandHandler) OnCreateStream ¶
func (h *NetConnectionCommandHandler) OnCreateStream(ctx context.Context, createStream CreateStream) ConnError
func (*NetConnectionCommandHandler) OnCreateStreamError ¶
func (h *NetConnectionCommandHandler) OnCreateStreamError(ctx context.Context, createStreamError CreateStreamError) ConnError
func (*NetConnectionCommandHandler) OnCreateStreamResult ¶
func (h *NetConnectionCommandHandler) OnCreateStreamResult(ctx context.Context, createStreamResult CreateStreamResult) ConnError
type NetConnectionCommander ¶
type NetConnectionCommander interface { Connect(ctx context.Context, commandObject map[string]interface{}, optionalUserArguments map[string]interface{}) error ConnectResult(ctx context.Context, properties map[string]interface{}, information map[string]interface{}) error ConnectError(ctx context.Context, properties map[string]interface{}, information map[string]interface{}) error Call(ctx context.Context, procedureName string, transactionID uint32, commandObject map[string]interface{}, optionalArguments map[string]interface{}) error CallResponse(ctx context.Context, commandName string, transactionID uint32, commandObject map[string]interface{}, response map[string]interface{}) error CreateStream(ctx context.Context, transactionID uint32, commandObject map[string]interface{}) error CreateStreamResult(ctx context.Context, transactionID uint32, commandObject map[string]interface{}, streamID uint32) error CreateStreamError(ctx context.Context, transactionID uint32, commandObject map[string]interface{}, streamID uint32) error }
type NetStreamCommandHandler ¶
type NetStreamCommandHandler struct { OnStatusHandlers []OnStatusHandler PlayHandlers []PlayHandler Play2Handlers []Play2Handler DeleteStreamHandlers []DeleteStreamHandler CloseStreamHandlers []CloseStreamHandler ReceiveAudioHandlers []ReceiveAudioHandler ReceiveVideoHandlers []ReceiveVideoHandler PublishHandlers []PublishHandler SeekHandlers []SeekHandler PauseHandlers []PauseHandler }
func (*NetStreamCommandHandler) OnCloseStream ¶
func (h *NetStreamCommandHandler) OnCloseStream(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, closeStream CloseStream) ConnError
func (*NetStreamCommandHandler) OnDeleteStream ¶
func (h *NetStreamCommandHandler) OnDeleteStream(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, deleteStream DeleteStream) ConnError
func (*NetStreamCommandHandler) OnOnStatus ¶
func (*NetStreamCommandHandler) OnReceiveAudio ¶
func (h *NetStreamCommandHandler) OnReceiveAudio(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, receiveAudio ReceiveAudio) ConnError
func (*NetStreamCommandHandler) OnReceiveVideo ¶
func (h *NetStreamCommandHandler) OnReceiveVideo(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, receiveVideo ReceiveVideo) ConnError
type NetStreamCommander ¶
type NetStreamCommander interface { OnStatus(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, infoObject map[string]interface{}) error Play(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, streamName string, start uint32, duration uint32, reset bool) error Play2(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, parameters map[string]interface{}) error DeleteStream(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, streamID uint32) error CloseStream(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, streamID uint32) error ReceiveAudio(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, boolFlag bool) error ReceiveVideo(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, boolFlag bool) error Publish(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, publishingName string, publishingType PublishingType) error Seek(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, milliSeconds uint32) error Pause(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, pauseUnpauseFlag bool, milliSeconds uint32) error }
type OnStatus ¶
type OnStatus interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} InfoObject() map[string]interface{} EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func NewOnStatus ¶
func NewOnStatus( infoObject map[string]interface{}, encodingAMFType EncodingAMFType, ) OnStatus
func UnmarshalOnStatusBinary ¶
func UnmarshalOnStatusBinary(b []byte, encodingAMFType EncodingAMFType) (OnStatus, error)
type OnStatusHandler ¶
type OnStatusHandlerFunc ¶
type OnStatusHandlerFunc func(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, onStatus OnStatus) ConnError
func (OnStatusHandlerFunc) OnOnStatus ¶
type Pause ¶
type Pause interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} PauseUnpauseFlag() bool MilliSeconds() uint32 EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func NewPause ¶
func NewPause( pauseUnpauseFlag bool, milliSeconds uint32, encodingAMFType EncodingAMFType, ) Pause
func UnmarshalPauseBinary ¶
func UnmarshalPauseBinary(b []byte, encodingAMFType EncodingAMFType) (Pause, error)
type PauseHandler ¶
type PauseHandlerFunc ¶
type PingRequest ¶
type PingRequest interface { UserControlMessage encoding.BinaryUnmarshaler Timestamp() uint32 }
func NewPingRequest ¶
func NewPingRequest( timestamp uint32, ) PingRequest
func ReadPingRequest ¶
func ReadPingRequest(r io.Reader) (PingRequest, error)
func UnmarshalPingRequestBinary ¶
func UnmarshalPingRequestBinary(b []byte) (PingRequest, error)
type PingRequestHandler ¶
type PingRequestHandler interface {
OnPingRequest(ctx context.Context, pingRequest PingRequest) ConnError
}
type PingRequestHandlerFunc ¶
type PingRequestHandlerFunc func(ctx context.Context, pingRequest PingRequest) ConnError
func (PingRequestHandlerFunc) OnPingRequest ¶
func (f PingRequestHandlerFunc) OnPingRequest(ctx context.Context, pingRequest PingRequest) ConnError
type PingResponse ¶
type PingResponse interface { UserControlMessage encoding.BinaryUnmarshaler Timestamp() uint32 }
func NewPingResponse ¶
func NewPingResponse( timestamp uint32, ) PingResponse
func ReadPingResponse ¶
func ReadPingResponse(r io.Reader) (PingResponse, error)
func UnmarshalPingResponseBinary ¶
func UnmarshalPingResponseBinary(b []byte) (PingResponse, error)
type PingResponseHandler ¶
type PingResponseHandler interface {
OnPingResponse(ctx context.Context, pingResponse PingResponse) ConnError
}
type PingResponseHandlerFunc ¶
type PingResponseHandlerFunc func(ctx context.Context, pingResponse PingResponse) ConnError
func (PingResponseHandlerFunc) OnPingResponse ¶
func (f PingResponseHandlerFunc) OnPingResponse(ctx context.Context, pingResponse PingResponse) ConnError
type Play ¶
type Play interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} StreamName() string Start() uint32 Duration() uint32 Reset() bool EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func UnmarshalPlayBinary ¶
func UnmarshalPlayBinary(b []byte, encodingAMFType EncodingAMFType) (Play, error)
type Play2 ¶
type Play2 interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} Parameters() map[string]interface{} EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func NewPlay2 ¶
func NewPlay2( parameters map[string]interface{}, encodingAMFType EncodingAMFType, ) Play2
func UnmarshalPlay2Binary ¶
func UnmarshalPlay2Binary(b []byte, encodingAMFType EncodingAMFType) (Play2, error)
type Play2Handler ¶
type Play2HandlerFunc ¶
type PlayHandler ¶
type PlayHandlerFunc ¶
type ProtocolControlEventHandler ¶
type ProtocolControlEventHandler struct { SetChunkSizeHandlers []SetChunkSizeHandler AbortMessageHandlers []AbortMessageHandler AcknowledgementHandlers []AcknowledgementHandler WindowAcknowledgementSizeHandlers []WindowAcknowledgementSizeHandler SetPeerBandwidthHandlers []SetPeerBandwidthHandler }
func (*ProtocolControlEventHandler) OnAbortMessage ¶
func (h *ProtocolControlEventHandler) OnAbortMessage(ctx context.Context, abortMessage AbortMessage) ConnError
func (*ProtocolControlEventHandler) OnAcknowledgement ¶
func (h *ProtocolControlEventHandler) OnAcknowledgement(ctx context.Context, acknowledgement Acknowledgement) ConnError
func (*ProtocolControlEventHandler) OnSetChunkSize ¶
func (h *ProtocolControlEventHandler) OnSetChunkSize(ctx context.Context, setChunkSize SetChunkSize) ConnError
func (*ProtocolControlEventHandler) OnSetPeerBandwidth ¶
func (h *ProtocolControlEventHandler) OnSetPeerBandwidth(ctx context.Context, setPeerBandwidth SetPeerBandwidth) ConnError
func (*ProtocolControlEventHandler) OnWindowAcknowledgementSize ¶
func (h *ProtocolControlEventHandler) OnWindowAcknowledgementSize(ctx context.Context, windowAcknowledgementSize WindowAcknowledgementSize) ConnError
type ProtocolController ¶
type ProtocolController interface { SetChunkSize(ctx context.Context, chunkSize uint32) error AbortMessage(ctx context.Context, chunkStreamID uint32) error Acknowledgement(ctx context.Context, sequenceNumber uint32) error WindowAcknowledgementSize(ctx context.Context, acknowledgementWindowSize uint32) error SetPeerBandwidth(ctx context.Context, acknowledgmentWindowSize uint32, limitType BandwidthLimitType) error }
type Publish ¶
type Publish interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} PublishingName() string PublishingType() PublishingType EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func NewPublish ¶
func NewPublish( publishingName string, publishingType PublishingType, encodingAMFType EncodingAMFType, ) Publish
func UnmarshalPublishBinary ¶
func UnmarshalPublishBinary(b []byte, encodingAMFType EncodingAMFType) (Publish, error)
type PublishHandler ¶
type PublishHandlerFunc ¶
type PublishingType ¶
type PublishingType string
const ( PublishingTypeLive PublishingType = "live" PublishingTypeRecord PublishingType = "record" PublishingTypeAppend PublishingType = "append" )
func (PublishingType) String ¶
func (v PublishingType) String() string
type Reader ¶
type ReceiveAudio ¶
type ReceiveAudio interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} BoolFlag() bool EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func NewReceiveAudio ¶
func NewReceiveAudio( boolFlag bool, encodingAMFType EncodingAMFType, ) ReceiveAudio
func UnmarshalReceiveAudioBinary ¶
func UnmarshalReceiveAudioBinary(b []byte, encodingAMFType EncodingAMFType) (ReceiveAudio, error)
type ReceiveAudioHandler ¶
type ReceiveAudioHandlerFunc ¶
type ReceiveAudioHandlerFunc func(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, receiveAudio ReceiveAudio) ConnError
func (ReceiveAudioHandlerFunc) OnReceiveAudio ¶
func (f ReceiveAudioHandlerFunc) OnReceiveAudio(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, receiveAudio ReceiveAudio) ConnError
type ReceiveVideo ¶
type ReceiveVideo interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} BoolFlag() bool EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func NewReceiveVideo ¶
func NewReceiveVideo( boolFlag bool, encodingAMFType EncodingAMFType, ) ReceiveVideo
func UnmarshalReceiveVideoBinary ¶
func UnmarshalReceiveVideoBinary(b []byte, encodingAMFType EncodingAMFType) (ReceiveVideo, error)
type ReceiveVideoHandler ¶
type ReceiveVideoHandlerFunc ¶
type ReceiveVideoHandlerFunc func(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, receiveVideo ReceiveVideo) ConnError
func (ReceiveVideoHandlerFunc) OnReceiveVideo ¶
func (f ReceiveVideoHandlerFunc) OnReceiveVideo(ctx context.Context, chunkStreamID uint32, messageStreamID uint32, receiveVideo ReceiveVideo) ConnError
type Seek ¶
type Seek interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler CommandName() string TransactionID() uint32 CommandObject() map[string]interface{} MilliSeconds() uint32 EncodingAMFType() EncodingAMFType SetEncodingAMFType(EncodingAMFType) }
func NewSeek ¶
func NewSeek( milliSeconds uint32, encodingAMFType EncodingAMFType, ) Seek
func UnmarshalSeekBinary ¶
func UnmarshalSeekBinary(b []byte, encodingAMFType EncodingAMFType) (Seek, error)
type SeekHandler ¶
type SeekHandlerFunc ¶
type Server ¶
type Server struct { Addr string // contains filtered or unexported fields }
func (*Server) ListenAndServe ¶
type SetBufferLength ¶
type SetBufferLength interface { UserControlMessage encoding.BinaryUnmarshaler StreamID() uint32 BufferLength() uint32 }
func NewSetBufferLength ¶
func NewSetBufferLength( streamID uint32, bufferLength uint32, ) SetBufferLength
func ReadSetBufferLength ¶
func ReadSetBufferLength(r io.Reader) (SetBufferLength, error)
func UnmarshalSetBufferLengthBinary ¶
func UnmarshalSetBufferLengthBinary(b []byte) (SetBufferLength, error)
type SetBufferLengthHandler ¶
type SetBufferLengthHandler interface {
OnSetBufferLength(ctx context.Context, setBufferLength SetBufferLength) ConnError
}
type SetBufferLengthHandlerFunc ¶
type SetBufferLengthHandlerFunc func(ctx context.Context, setBufferLength SetBufferLength) ConnError
func (SetBufferLengthHandlerFunc) OnSetBufferLength ¶
func (f SetBufferLengthHandlerFunc) OnSetBufferLength(ctx context.Context, setBufferLength SetBufferLength) ConnError
type SetChunkSize ¶
type SetChunkSize interface { encoding.BinaryMarshaler encoding.BinaryUnmarshaler zapcore.ObjectMarshaler ChunkSize() uint32 }
func NewSetChunkSize ¶
func NewSetChunkSize( chunkSize uint32, ) SetChunkSize
func ReadSetChunkSize ¶
func ReadSetChunkSize(r io.Reader) (SetChunkSize, error)
func UnmarshalSetChunkSizeBinary ¶
func UnmarshalSetChunkSizeBinary(b []byte) (SetChunkSize, error)
type SetChunkSizeHandler ¶
type SetChunkSizeHandler interface {
OnSetChunkSize(ctx context.Context, setChunkSize SetChunkSize) ConnError
}
type SetChunkSizeHandlerFunc ¶
type SetChunkSizeHandlerFunc func(ctx context.Context, setChunkSize SetChunkSize) ConnError
func (SetChunkSizeHandlerFunc) OnSetChunkSize ¶
func (f SetChunkSizeHandlerFunc) OnSetChunkSize(ctx context.Context, setChunkSize SetChunkSize) ConnError
type SetPeerBandwidth ¶
type SetPeerBandwidth interface { encoding.BinaryMarshaler encoding.BinaryUnmarshaler zapcore.ObjectMarshaler AcknowledgmentWindowSize() uint32 LimitType() BandwidthLimitType }
func NewSetPeerBandwidth ¶
func NewSetPeerBandwidth( acknowledgmentWindowSize uint32, limitType BandwidthLimitType, ) SetPeerBandwidth
func ReadSetPeerBandwidth ¶
func ReadSetPeerBandwidth(r io.Reader) (SetPeerBandwidth, error)
func UnmarshalSetPeerBandwidthBinary ¶
func UnmarshalSetPeerBandwidthBinary(b []byte) (SetPeerBandwidth, error)
type SetPeerBandwidthHandler ¶
type SetPeerBandwidthHandler interface {
OnSetPeerBandwidth(ctx context.Context, setPeerBandwidth SetPeerBandwidth) ConnError
}
type SetPeerBandwidthHandlerFunc ¶
type SetPeerBandwidthHandlerFunc func(ctx context.Context, setPeerBandwidth SetPeerBandwidth) ConnError
func (SetPeerBandwidthHandlerFunc) OnSetPeerBandwidth ¶
func (f SetPeerBandwidthHandlerFunc) OnSetPeerBandwidth(ctx context.Context, setPeerBandwidth SetPeerBandwidth) ConnError
type StreamBegin ¶
type StreamBegin interface { UserControlMessage encoding.BinaryUnmarshaler StreamID() uint32 }
func NewStreamBegin ¶
func NewStreamBegin( streamID uint32, ) StreamBegin
func ReadStreamBegin ¶
func ReadStreamBegin(r io.Reader) (StreamBegin, error)
func UnmarshalStreamBeginBinary ¶
func UnmarshalStreamBeginBinary(b []byte) (StreamBegin, error)
type StreamBeginHandler ¶
type StreamBeginHandler interface {
OnStreamBegin(ctx context.Context, streamBegin StreamBegin) ConnError
}
type StreamBeginHandlerFunc ¶
type StreamBeginHandlerFunc func(ctx context.Context, streamBegin StreamBegin) ConnError
func (StreamBeginHandlerFunc) OnStreamBegin ¶
func (f StreamBeginHandlerFunc) OnStreamBegin(ctx context.Context, streamBegin StreamBegin) ConnError
type StreamDry ¶
type StreamDry interface { UserControlMessage encoding.BinaryUnmarshaler StreamID() uint32 }
func NewStreamDry ¶
type StreamDryHandler ¶
type StreamDryHandlerFunc ¶
func (StreamDryHandlerFunc) OnStreamDry ¶
func (f StreamDryHandlerFunc) OnStreamDry(ctx context.Context, streamDry StreamDry) ConnError
type StreamEOF ¶
type StreamEOF interface { UserControlMessage encoding.BinaryUnmarshaler StreamID() uint32 }
func NewStreamEOF ¶
type StreamEOFHandler ¶
type StreamEOFHandlerFunc ¶
func (StreamEOFHandlerFunc) OnStreamEOF ¶
func (f StreamEOFHandlerFunc) OnStreamEOF(ctx context.Context, streamEOF StreamEOF) ConnError
type StreamIsRecorded ¶
type StreamIsRecorded interface { UserControlMessage encoding.BinaryUnmarshaler StreamID() uint32 }
func NewStreamIsRecorded ¶
func NewStreamIsRecorded( streamID uint32, ) StreamIsRecorded
func ReadStreamIsRecorded ¶
func ReadStreamIsRecorded(r io.Reader) (StreamIsRecorded, error)
func UnmarshalStreamIsRecordedBinary ¶
func UnmarshalStreamIsRecordedBinary(b []byte) (StreamIsRecorded, error)
type StreamIsRecordedHandler ¶
type StreamIsRecordedHandler interface {
OnStreamIsRecorded(ctx context.Context, streamIsRecorded StreamIsRecorded) ConnError
}
type StreamIsRecordedHandlerFunc ¶
type StreamIsRecordedHandlerFunc func(ctx context.Context, streamIsRecorded StreamIsRecorded) ConnError
func (StreamIsRecordedHandlerFunc) OnStreamIsRecorded ¶
func (f StreamIsRecordedHandlerFunc) OnStreamIsRecorded(ctx context.Context, streamIsRecorded StreamIsRecorded) ConnError
type UserControlEventHandler ¶
type UserControlEventHandler struct { StreamBeginHandlers []StreamBeginHandler StreamEOFHandlers []StreamEOFHandler StreamDryHandlers []StreamDryHandler SetBufferLengthHandlers []SetBufferLengthHandler StreamIsRecordedHandlers []StreamIsRecordedHandler PingRequestHandlers []PingRequestHandler PingResponseHandlers []PingResponseHandler }
func (*UserControlEventHandler) OnPingRequest ¶
func (h *UserControlEventHandler) OnPingRequest(ctx context.Context, pingRequest PingRequest) ConnError
func (*UserControlEventHandler) OnPingResponse ¶
func (h *UserControlEventHandler) OnPingResponse(ctx context.Context, pingResponse PingResponse) ConnError
func (*UserControlEventHandler) OnSetBufferLength ¶
func (h *UserControlEventHandler) OnSetBufferLength(ctx context.Context, setBufferLength SetBufferLength) ConnError
func (*UserControlEventHandler) OnStreamBegin ¶
func (h *UserControlEventHandler) OnStreamBegin(ctx context.Context, streamBegin StreamBegin) ConnError
func (*UserControlEventHandler) OnStreamDry ¶
func (h *UserControlEventHandler) OnStreamDry(ctx context.Context, streamDry StreamDry) ConnError
func (*UserControlEventHandler) OnStreamEOF ¶
func (h *UserControlEventHandler) OnStreamEOF(ctx context.Context, streamEOF StreamEOF) ConnError
func (*UserControlEventHandler) OnStreamIsRecorded ¶
func (h *UserControlEventHandler) OnStreamIsRecorded(ctx context.Context, streamIsRecorded StreamIsRecorded) ConnError
type UserControlMessage ¶
type UserControlMessage interface { encoding.BinaryMarshaler zapcore.ObjectMarshaler EventType() EventType }
type UserController ¶
type UserController interface { StreamBegin(ctx context.Context, streamID uint32) error StreamEOF(ctx context.Context, streamID uint32) error StreamDry(ctx context.Context, streamID uint32) error SetBufferLength(ctx context.Context, streamID uint32, bufferLength uint32) error StreamIsRecorded(ctx context.Context, streamID uint32) error PingRequest(ctx context.Context, timestamp uint32) error PingResponse(ctx context.Context, timestamp uint32) error }
type VideoCodecFlag ¶
type VideoCodecFlag uint32
const ( VideoCodecFlagUnused VideoCodecFlag = 1 VideoCodecFlagJpeg VideoCodecFlag = 2 VideoCodecFlagSorenson VideoCodecFlag = 4 VideoCodecFlagHomebrew VideoCodecFlag = 8 VideoCodecFlagVp6 VideoCodecFlag = 16 VideoCodecFlagVp6alpha VideoCodecFlag = 32 VideoCodecFlagHomebrewv VideoCodecFlag = 64 VideoCodecFlagH264 VideoCodecFlag = 128 VideoCodecFlagAll VideoCodecFlag = 255 )
func (VideoCodecFlag) String ¶
func (i VideoCodecFlag) String() string
type VideoFunctionFlag ¶
type VideoFunctionFlag uint8
const (
VideoFunctionFlagClientSeek VideoFunctionFlag = 1
)
func (VideoFunctionFlag) String ¶
func (i VideoFunctionFlag) String() string
type WindowAcknowledgementSize ¶
type WindowAcknowledgementSize interface { encoding.BinaryMarshaler encoding.BinaryUnmarshaler zapcore.ObjectMarshaler AcknowledgementWindowSize() uint32 }
func NewWindowAcknowledgementSize ¶
func NewWindowAcknowledgementSize( acknowledgementWindowSize uint32, ) WindowAcknowledgementSize
func ReadWindowAcknowledgementSize ¶
func ReadWindowAcknowledgementSize(r io.Reader) (WindowAcknowledgementSize, error)
func UnmarshalWindowAcknowledgementSizeBinary ¶
func UnmarshalWindowAcknowledgementSizeBinary(b []byte) (WindowAcknowledgementSize, error)
type WindowAcknowledgementSizeHandler ¶
type WindowAcknowledgementSizeHandler interface {
OnWindowAcknowledgementSize(ctx context.Context, windowAcknowledgementSize WindowAcknowledgementSize) ConnError
}
type WindowAcknowledgementSizeHandlerFunc ¶
type WindowAcknowledgementSizeHandlerFunc func(ctx context.Context, windowAcknowledgementSize WindowAcknowledgementSize) ConnError
func (WindowAcknowledgementSizeHandlerFunc) OnWindowAcknowledgementSize ¶
func (f WindowAcknowledgementSizeHandlerFunc) OnWindowAcknowledgementSize(ctx context.Context, windowAcknowledgementSize WindowAcknowledgementSize) ConnError
Source Files ¶
- chunk.go
- chunk_basic_header.go
- chunk_basic_header_gen.go
- chunk_gen.go
- chunk_header.go
- chunk_header_gen.go
- chunk_message_header.go
- chunk_message_header_gen.go
- chunk_stream.go
- client.go
- cmd_netconnection.go
- cmd_netconnection_audio_codec_flag_string_gen.go
- cmd_netconnection_encoding_amf_type_string_gen.go
- cmd_netconnection_gen.go
- cmd_netconnection_handler_gen.go
- cmd_netconnection_video_codec_flag_string_gen.go
- cmd_netconnection_video_function_flag_string_gen.go
- cmd_netstream.go
- cmd_netstream_gen.go
- cmd_netstream_handler_gen.go
- conn.go
- conn_control_message_handler.go
- conn_default.go
- conn_initializer.go
- conn_netconnection_command_handler.go
- conn_netconnection_commander.go
- conn_netstream_command_handler.go
- conn_netstream_commander.go
- conn_options.go
- conn_protocol_control_event_handler.go
- conn_protocol_controller.go
- conn_user_control_event_handler.go
- conn_user_controller.go
- error.go
- message.go
- message_gen.go
- message_handler.go
- message_pubsub.go
- message_typeid_string_gen.go
- msg_protocol_control.go
- msg_protocol_control_bandwidth_limit_type_string_gen.go
- msg_protocol_control_gen.go
- msg_protocol_control_handler_gen.go
- msg_user_control.go
- msg_user_control_event_type_string_gen.go
- msg_user_control_gen.go
- msg_user_control_handler_gen.go
- netconnection_commander_gen.go
- netstream_commander_gen.go
- protocol_controller_gen.go
- reader.go
- server.go
- user_controller_gen.go
- util.go
- writer.go
Click to show internal directories.
Click to hide internal directories.