コード例 #1
0
ファイル: server.go プロジェクト: berndfo/gortmp
// Server handler functions
func (handler *ServerHandler) NewConnection(serverConn rtmp.ServerConn, connectReq *rtmp.Command,
	server *rtmp.Server) bool {
	//log.Printf("[%s] attaching handler for new connection", serverConn.Conn().Id())
	serverConn.Attach(handler)
	return true
}
コード例 #2
0
ファイル: server.go プロジェクト: berndfo/gortmp
// ServerConnHandler methods
func (handler *ServerHandler) OnStatus(conn rtmp.ServerConn) {
	status, err := conn.Status()
	log.Printf("OnStatus: %d (%s), err: %v\n", status, rtmp.StatusDisplay(status), err)
}