Documentation ¶
Index ¶
- Variables
- type Server
- type ServerObserver
- type SubSession
- func (session *SubSession) AppName() string
- func (session *SubSession) Dispose()
- func (session *SubSession) GetStat() base.StatSession
- func (session *SubSession) IsAlive() (readAlive, writeAlive bool)
- func (session *SubSession) RawQuery() string
- func (session *SubSession) ReadRequest() (err error)
- func (session *SubSession) RemoteAddr() string
- func (session *SubSession) RunLoop() error
- func (session *SubSession) StreamName() string
- func (session *SubSession) URL() string
- func (session *SubSession) UpdateStat(interval uint32)
- func (session *SubSession) WriteFragmentHeader()
- func (session *SubSession) WriteHTTPResponseHeader()
- func (session *SubSession) WriteRawPacket(pkt []byte)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHTTPTS = errors.New("lal.httpts: fxxk")
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(observer ServerObserver, addr string) *Server
type ServerObserver ¶
type ServerObserver interface { // 通知上层有新的拉流者 // 返回值: true则允许拉流,false则关闭连接 OnNewHTTPTSSubSession(session *SubSession) bool OnDelHTTPTSSubSession(session *SubSession) }
type SubSession ¶
func NewSubSession ¶
func NewSubSession(conn net.Conn, scheme string) *SubSession
func (*SubSession) AppName ¶
func (session *SubSession) AppName() string
func (*SubSession) Dispose ¶
func (session *SubSession) Dispose()
func (*SubSession) GetStat ¶
func (session *SubSession) GetStat() base.StatSession
func (*SubSession) IsAlive ¶
func (session *SubSession) IsAlive() (readAlive, writeAlive bool)
func (*SubSession) RawQuery ¶
func (session *SubSession) RawQuery() string
func (*SubSession) ReadRequest ¶
func (session *SubSession) ReadRequest() (err error)
TODO chef: read request timeout
func (*SubSession) RemoteAddr ¶
func (session *SubSession) RemoteAddr() string
func (*SubSession) RunLoop ¶
func (session *SubSession) RunLoop() error
func (*SubSession) StreamName ¶
func (session *SubSession) StreamName() string
func (*SubSession) URL ¶
func (session *SubSession) URL() string
func (*SubSession) UpdateStat ¶
func (session *SubSession) UpdateStat(interval uint32)
func (*SubSession) WriteFragmentHeader ¶
func (session *SubSession) WriteFragmentHeader()
func (*SubSession) WriteHTTPResponseHeader ¶
func (session *SubSession) WriteHTTPResponseHeader()
func (*SubSession) WriteRawPacket ¶
func (session *SubSession) WriteRawPacket(pkt []byte)
Click to show internal directories.
Click to hide internal directories.