httpts

package
v0.19.11 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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

func (*Server) Dispose

func (server *Server) Dispose()

func (*Server) Listen

func (server *Server) Listen() (err error)

func (*Server) RunLoop

func (server *Server) RunLoop() error

type ServerObserver

type ServerObserver interface {
	// 通知上层有新的拉流者
	// 返回值: true则允许拉流,false则关闭连接
	OnNewHTTPTSSubSession(session *SubSession) bool

	OnDelHTTPTSSubSession(session *SubSession)
}

type SubSession

type SubSession struct {
	UniqueKey string
	IsFresh   bool
	// contains filtered or unexported fields
}

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)

Jump to

Keyboard shortcuts

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