Documentation ¶
Index ¶
- Variables
- type ChunkStream
- type Conn
- func (conn *Conn) Close() error
- func (conn *Conn) Flush() error
- func (conn *Conn) HandshakeClient() (err error)
- func (conn *Conn) HandshakeServer() (err error)
- func (conn *Conn) LocalAddr() net.Addr
- func (conn *Conn) NewAck(size uint32) ChunkStream
- func (conn *Conn) NewSetChunkSize(size uint32) ChunkStream
- func (conn *Conn) NewSetPeerBandwidth(size uint32) ChunkStream
- func (conn *Conn) NewWindowAckSize(size uint32) ChunkStream
- func (conn *Conn) Read(c *ChunkStream) error
- func (conn *Conn) RemoteAddr() net.Addr
- func (conn *Conn) SetBegin()
- func (conn *Conn) SetDeadline(t time.Time) error
- func (conn *Conn) SetRecorded()
- func (conn *Conn) Write(c *ChunkStream) error
- type ConnClient
- func (connClient *ConnClient) Close(err error)
- func (connClient *ConnClient) DecodeBatch(r io.Reader, ver amf.Version) (ret []interface{}, err error)
- func (connClient *ConnClient) Flush() error
- func (connClient *ConnClient) GetInfo() (app string, name string, url string)
- func (connClient *ConnClient) GetStreamId() uint32
- func (connClient *ConnClient) Read(c *ChunkStream) (err error)
- func (connClient *ConnClient) Start(url string, method string) error
- func (connClient *ConnClient) Write(c ChunkStream) error
- type ConnServer
- func (connServer *ConnServer) Close(err error)
- func (connServer *ConnServer) Flush() error
- func (connServer *ConnServer) GetInfo() (app string, name string, url string)
- func (connServer *ConnServer) IsPublisher() bool
- func (connServer *ConnServer) Read(c *ChunkStream) (err error)
- func (connServer *ConnServer) ReadMsg() error
- func (connServer *ConnServer) Write(c ChunkStream) error
- type ConnectEvent
- type ConnectInfo
- type ConnectResp
- type PublishInfo
- type ReadWriter
- func (rw *ReadWriter) Flush() error
- func (rw *ReadWriter) Read(p []byte) (int, error)
- func (rw *ReadWriter) ReadError() error
- func (rw *ReadWriter) ReadUintBE(n int) (uint32, error)
- func (rw *ReadWriter) ReadUintLE(n int) (uint32, error)
- func (rw *ReadWriter) Write(p []byte) (int, error)
- func (rw *ReadWriter) WriteError() error
- func (rw *ReadWriter) WriteUintBE(v uint32, n int) error
- func (rw *ReadWriter) WriteUintLE(v uint32, n int) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFail = fmt.Errorf("respone err")
)
View Source
var (
ErrReq = fmt.Errorf("req error")
)
Functions ¶
This section is empty.
Types ¶
type ChunkStream ¶
type Conn ¶
func (*Conn) HandshakeClient ¶
func (*Conn) HandshakeServer ¶
func (*Conn) NewAck ¶
func (conn *Conn) NewAck(size uint32) ChunkStream
func (*Conn) NewSetChunkSize ¶
func (conn *Conn) NewSetChunkSize(size uint32) ChunkStream
func (*Conn) NewSetPeerBandwidth ¶
func (conn *Conn) NewSetPeerBandwidth(size uint32) ChunkStream
func (*Conn) NewWindowAckSize ¶
func (conn *Conn) NewWindowAckSize(size uint32) ChunkStream
func (*Conn) Read ¶
func (conn *Conn) Read(c *ChunkStream) error
func (*Conn) RemoteAddr ¶
func (*Conn) SetRecorded ¶
func (conn *Conn) SetRecorded()
func (*Conn) Write ¶
func (conn *Conn) Write(c *ChunkStream) error
type ConnClient ¶
type ConnClient struct {
// contains filtered or unexported fields
}
func NewConnClient ¶
func NewConnClient() *ConnClient
func (*ConnClient) Close ¶
func (connClient *ConnClient) Close(err error)
func (*ConnClient) DecodeBatch ¶
func (*ConnClient) Flush ¶
func (connClient *ConnClient) Flush() error
func (*ConnClient) GetInfo ¶
func (connClient *ConnClient) GetInfo() (app string, name string, url string)
func (*ConnClient) GetStreamId ¶
func (connClient *ConnClient) GetStreamId() uint32
func (*ConnClient) Read ¶
func (connClient *ConnClient) Read(c *ChunkStream) (err error)
func (*ConnClient) Write ¶
func (connClient *ConnClient) Write(c ChunkStream) error
type ConnServer ¶
type ConnServer struct { ConnInfo ConnectInfo PublishInfo PublishInfo // contains filtered or unexported fields }
func NewConnServer ¶
func NewConnServer(conn *Conn) *ConnServer
func (*ConnServer) Close ¶
func (connServer *ConnServer) Close(err error)
func (*ConnServer) Flush ¶
func (connServer *ConnServer) Flush() error
func (*ConnServer) GetInfo ¶
func (connServer *ConnServer) GetInfo() (app string, name string, url string)
func (*ConnServer) IsPublisher ¶
func (connServer *ConnServer) IsPublisher() bool
func (*ConnServer) Read ¶
func (connServer *ConnServer) Read(c *ChunkStream) (err error)
func (*ConnServer) ReadMsg ¶
func (connServer *ConnServer) ReadMsg() error
func (*ConnServer) Write ¶
func (connServer *ConnServer) Write(c ChunkStream) error
type ConnectEvent ¶
type ConnectInfo ¶
type ConnectInfo struct { App string `amf:"app" json:"app"` Flashver string `amf:"flashVer" json:"flashVer"` SwfUrl string `amf:"swfUrl" json:"swfUrl"` TcUrl string `amf:"tcUrl" json:"tcUrl"` Fpad bool `amf:"fpad" json:"fpad"` AudioCodecs int `amf:"audioCodecs" json:"audioCodecs"` VideoCodecs int `amf:"videoCodecs" json:"videoCodecs"` VideoFunction int `amf:"videoFunction" json:"videoFunction"` PageUrl string `amf:"pageUrl" json:"pageUrl"` ObjectEncoding int `amf:"objectEncoding" json:"objectEncoding"` }
type ConnectResp ¶
type PublishInfo ¶
type ReadWriter ¶
type ReadWriter struct { *bufio.ReadWriter // contains filtered or unexported fields }
func NewReadWriter ¶
func NewReadWriter(rw io.ReadWriter, bufSize int) *ReadWriter
func (*ReadWriter) Flush ¶
func (rw *ReadWriter) Flush() error
func (*ReadWriter) ReadError ¶
func (rw *ReadWriter) ReadError() error
func (*ReadWriter) ReadUintBE ¶
func (rw *ReadWriter) ReadUintBE(n int) (uint32, error)
func (*ReadWriter) ReadUintLE ¶
func (rw *ReadWriter) ReadUintLE(n int) (uint32, error)
func (*ReadWriter) WriteError ¶
func (rw *ReadWriter) WriteError() error
func (*ReadWriter) WriteUintBE ¶
func (rw *ReadWriter) WriteUintBE(v uint32, n int) error
func (*ReadWriter) WriteUintLE ¶
func (rw *ReadWriter) WriteUintLE(v uint32, n int) error
Click to show internal directories.
Click to hide internal directories.